mIRC Home    About    Download    Register    News    Help

Print Thread
#43556 22/08/03 10:47 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
OP Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
To reproduce put this in your remotes:
Code:
alias test {
  if ($1 == blah) { echo -a $1 }
  if ($1 == blah { echo -a $1 }
}

and type this line:
/test a
And you will get an error like this:
* /elseif: invalid format (line 3, script.ini)
That (obviously) isn't right, since there isn't an elseif in the script.

If you type this line:
/test blah
and it works properly, with an error like this:
* /if: invalid format (line 3, script.ini)

Reproduced on mIRC 6.03.

#43557 22/08/03 03:39 PM
Joined: Jan 2003
Posts: 45
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Jan 2003
Posts: 45
alias test {
if ($1 == blah) { echo -a $1 }
if ($1 == blah ) { echo -a $1 }
}


@#botwars @Kreynet
#43558 22/08/03 06:17 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Interesting bug.

I'm guessing this happens because mIRC looks for an else/elseif-statement immediately after a failed if-statement, so when it comes to choosing which error to display, it simply checks for the presence of this failed if state flag.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#43559 22/08/03 09:16 PM
Joined: Aug 2003
Posts: 27
F
fez Offline
Ameglian cow
Offline
Ameglian cow
F
Joined: Aug 2003
Posts: 27
try using a closed parenthesis and maybe take a programming class.

#43560 22/08/03 09:32 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Yes, good observation, however a bug nonetheless as there is no elseif in that alias.

#43561 22/08/03 09:33 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
how bout you shut yo' mouth and re-read the original post along with Rela.

the missing parenthesis is intentional.

that means we are well aware that it is missing.

the bug is the error message that is being reported.

the cause of the error is not up for discussion.

I am typing in double space so you can absorb this information easier.

welcome to the forum.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#43562 22/08/03 10:07 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Quote:

I am typing in double space so you can absorb this information easier.

S h o u l d
h a v e
s p a c e d
t h e
l e t t e r s
o u t
a l s o . . . grin

#43563 22/08/03 10:37 PM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
I stand corrected, I thought it was mIRC just handling the 'if' differently when following another if. My appologies to anyone I may have irritated in the other thread.


- Jason

Link Copied to Clipboard