mIRC Home    About    Download    Register    News    Help

Print Thread
#205226 17/10/08 04:39 PM
B
bind1
bind1
B
So I discovered these bugs lately...

Looks like the () around the if statement makes it execute the command after ) if it's true
//noop $iif((1 isnum) echo -ag fail,1)
returns (echoes):
fail /!return 1

And.. mIRC has troubles parsing:
//echo -a $replace(ab.,},}) . c
returns(echoes):
abc

#205272 18/10/08 04:28 PM
S
symphony
symphony
S
Originally Posted By: bind1
So I discovered these bugs lately...

Looks like the () around the if statement makes it execute the command after ) if it's true
//noop $iif((1 isnum) echo -ag fail,1)
returns (echoes):
fail /!return 1

Your $iif() has a bad syntax. $iif((1 isnum), echo -ag fail,echo 1)
Also why do you need to noop it? I don't understand.
Originally Posted By: bind1
And.. mIRC has troubles parsing:
//echo -a $replace(ab.,},}) . c
returns(echoes):
abc

I am not sure if its a bug or not, } is kinda a reserved character. But replacing it from a text using replace w/o $eval() kinda should return such results.

#205277 18/10/08 08:37 PM
B
bind1
bind1
B
Er, $iif can be used with 2 parameters, $iif(blah,do this), returns do this or $null depending if its true or false..

#205278 18/10/08 09:51 PM
S
symphony
symphony
S
I know that already, but $iif((1 isnum) echo -ag fail,1) <== doesn't look right.

#205280 18/10/08 10:39 PM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
But even if it's wrong syntax, mirc should not behave this way, and the bug with { } is as odd as $eval({,1) $eval({,2} etc... or "//echo -a ok } echo -a ok2" and such


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #205505 24/10/08 04:33 PM
Joined: Oct 2003
Posts: 214
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
There is no 'but'!
A wrong syntax will create wrong results.


one step closer to world domination
Sephiroth_ #205507 24/10/08 05:22 PM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
it's your opinion, mine is that usually, mirc try to prevent wrong syntax to be executed.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #205519 24/10/08 10:16 PM
S
symphony
symphony
S
Sephiroth_ is right, and also the syntax looks rather exploited than wrong to me. The wrong result is expected.

#205522 24/10/08 10:44 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
Whether it looks right or not, there's nothing syntatically invalid with that code. There's no reason that code shouldn't work.


Link Copied to Clipboard