mIRC Home    About    Download    Register    News    Help

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


mIRC Scripts IRC Network: irc://irc.mircscripts.net/chat
Re: * /set: invalid parameters [Re: _entropy] #269375 19/09/21 08:05 AM
Joined: Jan 2004
Posts: 1,620
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,620
Try this:

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

Re: * /set: invalid parameters [Re: maroon] #269381 24/09/21 02:16 AM
Joined: Aug 2015
Posts: 60
_entropy Offline OP
Babel fish
OP Offline
Babel fish
Joined: Aug 2015
Posts: 60
I know that... was wondering if that bug can be fixed...


mIRC Scripts IRC Network: irc://irc.mircscripts.net/chat
Re: * /set: invalid parameters [Re: _entropy] #269388 25/09/21 02:41 PM
Joined: Dec 2002
Posts: 5,007
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,007
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.

Re: * /set: invalid parameters [Re: _entropy] #269389 25/09/21 03:25 PM
Joined: Sep 2005
Posts: 80
deVilbaT Offline
Babel fish
Offline
Babel fish
Joined: Sep 2005
Posts: 80
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
Re: * /set: invalid parameters [Re: Khaled] #269392 25/09/21 05:57 PM
Joined: Jul 2006
Posts: 3,816
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,816
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.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net