mIRC Home    About    Download    Register    News    Help

Print Thread
#269372 19/09/21 05:34 AM
Joined: Aug 2015
Posts: 70
Babel fish
OP Offline
Babel fish
Joined: Aug 2015
Posts: 70
This doesn't work: //var %d = 10 | set -u $+ %d %variable TRUE
* /set: invalid parameters


mIRC Scripts IRC Network: irc://irc.mircscripts.info/chat
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Try this:

Code
//var %d = 10 | set $+(-su,%d) %variable TRUE

Joined: Aug 2015
Posts: 70
Babel fish
OP Offline
Babel fish
Joined: Aug 2015
Posts: 70
I know that... was wondering if that bug can be fixed...


mIRC Scripts IRC Network: irc://irc.mircscripts.info/chat
Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
That is how the order of evaluation works in the scripting language, from left to right, although there may be exceptions in some contexts/commands.

You can normally control the order of evaluation using [] brackets or $+(), as shown in maroon's example.

Joined: Sep 2005
Posts: 116
Vogon poet
Offline
Vogon poet
Joined: Sep 2005
Posts: 116
Diffenent works for /scon -a (or at-1) set % $+ n1 . You can allwas learn $+([,<text>,]) or .timer true [ $+ [ %yes ] ], etc. Should try.


when no one watching us
we are invisible
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
This is in fact related to /set needing not to evaluate the %variable name, I've actually described this on wikichip as well as other variables related quirks: https://en.wikichip.org/wiki/mirc/variables
It's not related to evaluation in general, just related to variable commands etc.
In addition to the qurik listed in the link, /var has a similar quirk where it won't work if the parameter is not starting with a variable, "//var % $+ name value" correctly sets %name, but "//var $+(%,name) value" won't, interestingly enough, if such an assignement fails, other assignements will work: "//var $+(%,name) value,%var value" would set %var correctly.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard