mIRC Home    About    Download    Register    News    Help

Print Thread
N
nico
nico
N
Good evening fellow mIRC users,

Can anyone help me why the colon is not printed following command:

//tokenize 32 a b | say $* $+ : hi

The result is:
a hi
b hi

Where as I would expect:
a: hi
b: hi

Thank you in advance
   nico, Founder and chairman of the Stop IRC Bullying Foundation

Joined: Dec 2002
Posts: 294
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 294
Not sure if this is possible. $* is quirky and not really officially supported. $* has to be handled independently of other identifiers since it doesn't follow the standard behavior of simply returning a value.

Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
What happens with $* is that mIRC takes the whole command and its parameter, replaces $* with `~$*, then evaluates the code so "say `~$* $+ : hi", resulting in "say `~$*: hi" and only then, at the end, replaces with the correct parameter from $N, removing any character sticked to it.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
Try:

//tokenize 32 a b | scon -r msg $!active $* $!+ : hi

N
nico
nico
N
Ah, I see. Thank you guys.

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
What's up with the good old while loop through the $gettok()?


Link Copied to Clipboard