mIRC Home    About    Download    Register    News    Help

Print Thread
#46844 03/09/03 11:11 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I know some of you are going to quote me on this, so before anyone does (tontito) I know I am missing parenthesis.
Collective made a post about this bug in mIRC 6.03 I believe, however it is still there. I noticed something else in the process of testing it.
Code:
alias test {
  if ($1 == a) { echo a }
  if ($1 == b { echo b }
}

Now when I do:
/test a
I get:
-
a
-
* /if: invalid format (line 3, script.ini)
-
Nw, when I do:
/test b
I get:
-
* /if: invalid format (line 3, script.ini)
-
* /elseif: invalid format (line 3, script.ini)
-
for some reason.
Maybe it is just me with the /if and /elseif, but I upgraded to mIRC 6.1 and that bug is still there.

Joined: Jan 2003
Posts: 148
K
Vogon poet
Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
No [censored]! You have to close the if statement!

alias test {
if ($1 == a) { echo a }
if ($1 == b) { echo b }
}

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I did say you'd quote me on it, I know I missed the ) out, I was just saying it is returning /IF and /ELSEIF, next time READ..

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Seems like a bug to me, there is no elseif there...

Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
I agree, in fact, I've noticed several times before, in a series of if statements, that on odd occasions, it will return an /elseif error when there is no else if statement.

I figure this to be that mIRC (when going through scripts) will treat the first if statement as it should, and if there is one after the initial statement, and the initial if hasn't met the criteria, it treats it like an else if.

Of course, I could be very wrong.


--------
mIRC - fun for all the family (except grandma and grandpa)
Joined: Dec 2002
Posts: 37
O
Ameglian cow
Offline
Ameglian cow
O
Joined: Dec 2002
Posts: 37
That is what you call syntax error. This is not a bug in mirc. Your if-sentence is not complete, so how can you POSSIBLY expect mIRC to behave like this and that, just because your if-sentence looks the way it does? Stupid post and waste of time. Can't believe I actually replied to this.


Bloop
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
It's surprising how many people completely fail to get SladeKraven's point and resort to insults instead...

What he's saying is that when there's a syntax error in an /if statement, mirc reports an /elseif error. This only happens when the previous /if statement is false.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
If it's a syntax error, the /elseif is a hallucination? I don't think so.
It's only stupid to you because you like many others cannot read properly, the post name is Simple error bug, would you like that in simpler form.
S i m p l e
e r r o r
b u g.
Ironic that only Pheonix, Codemastr and Qwerty actually knew what I was saying and you didn't know.
I did say people would quote me on that, if you had read my post slower, you would have probably undestood, I can't interpret the post any clearer.
Quote:

so how can you POSSIBLY expect mIRC to behave like this and that, just because your if-sentence looks the way it does?


It should be returning * /if: invalid format
not /elseif.

Joined: Dec 2002
Posts: 37
O
Ameglian cow
Offline
Ameglian cow
O
Joined: Dec 2002
Posts: 37
Yes, I see now and I stand corrected. My apologies to SladeKraven for ranting at him like that smirk


Bloop
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Apology accepted. grin

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
You probably should have linked to the earlier thread in question, where this bug is already explained in excruciating detail.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard