mIRC Homepage
Posted By: bind1 2 bugs. - 17/10/08 04:39 PM
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
Posted By: symphony Re: 2 bugs. - 18/10/08 04:28 PM
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.
Posted By: bind1 Re: 2 bugs. - 18/10/08 08:37 PM
Er, $iif can be used with 2 parameters, $iif(blah,do this), returns do this or $null depending if its true or false..
Posted By: symphony Re: 2 bugs. - 18/10/08 09:51 PM
I know that already, but $iif((1 isnum) echo -ag fail,1) <== doesn't look right.
Posted By: Wims Re: 2 bugs. - 18/10/08 10:39 PM
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
Posted By: Sephiroth_ Re: 2 bugs. - 24/10/08 04:33 PM
There is no 'but'!
A wrong syntax will create wrong results.
Posted By: Wims Re: 2 bugs. - 24/10/08 05:22 PM
it's your opinion, mine is that usually, mirc try to prevent wrong syntax to be executed.
Posted By: symphony Re: 2 bugs. - 24/10/08 10:16 PM
Sephiroth_ is right, and also the syntax looks rather exploited than wrong to me. The wrong result is expected.
Posted By: starbucks_mafia Re: 2 bugs. - 24/10/08 10:44 PM
Whether it looks right or not, there's nothing syntatically invalid with that code. There's no reason that code shouldn't work.
© mIRC Discussion Forums