mIRC Home    About    Download    Register    News    Help

Print Thread
#205226 17/10/08 04:39 PM
Joined: Oct 2008
Posts: 2
B
bind1 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
B
Joined: Oct 2008
Posts: 2
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

bind1 #205272 18/10/08 04:28 PM
Joined: Jan 2006
Posts: 468
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
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.

symphony #205277 18/10/08 08:37 PM
Joined: Oct 2008
Posts: 2
B
bind1 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
B
Joined: Oct 2008
Posts: 2
Er, $iif can be used with 2 parameters, $iif(blah,do this), returns do this or $null depending if its true or false..

bind1 #205278 18/10/08 09:51 PM
Joined: Jan 2006
Posts: 468
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
I know that already, but $iif((1 isnum) echo -ag fail,1) <== doesn't look right.

symphony #205280 18/10/08 10:39 PM
Joined: Jul 2006
Posts: 3,944
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,944
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: 3,944
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,944
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
Joined: Jan 2006
Posts: 468
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
Sephiroth_ is right, and also the syntax looks rather exploited than wrong to me. The wrong result is expected.

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


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard