mIRC Home    About    Download    Register    News    Help

Print Thread
2 bugs. #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

Re: 2 bugs. [Re: bind1] #205272 18/10/08 04:28 PM
Joined: Jan 2006
Posts: 468
symphony Offline
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.

Re: 2 bugs. [Re: 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..

Re: 2 bugs. [Re: bind1] #205278 18/10/08 09:51 PM
Joined: Jan 2006
Posts: 468
symphony Offline
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.

Re: 2 bugs. [Re: symphony] #205280 18/10/08 10:39 PM
Joined: Jul 2006
Posts: 3,807
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,807
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


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: 2 bugs. [Re: Wims] #205505 24/10/08 04:33 PM
Joined: Oct 2003
Posts: 214
S
Sephiroth_ Offline
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
Re: 2 bugs. [Re: Sephiroth_] #205507 24/10/08 05:22 PM
Joined: Jul 2006
Posts: 3,807
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,807
it's your opinion, mine is that usually, mirc try to prevent wrong syntax to be executed.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: 2 bugs. [Re: Wims] #205519 24/10/08 10:16 PM
Joined: Jan 2006
Posts: 468
symphony Offline
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.

Re: 2 bugs. [Re: symphony] #205522 24/10/08 10:44 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
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.