|
Joined: Jan 2003
Posts: 154
Vogon poet
|
OP
Vogon poet
Joined: Jan 2003
Posts: 154 |
* /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format * /if: invalid format
get the idea? (that's just a small part of it. It doesn't happen immediately, 1 /if error pops up every now and then.)
it keeps saying "* /if: invalid format", but it doesn't say where it comes from. Having around 45 script files loaded, it's kind of tough figuring out where in the world that if statement is erroring..
Making the /if command always show what script and line it's erroring out at (if being called from a script) would be very nice.
- Wherever you go there you are.[color:lightgreen]
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
I am using mIRC 6.03 and it does just that. * /if: invalid format (line 2, script1.ini)
alias num {
if ($1 == 1 { echo -a The number is one. }
else { echo -a Unknown number. }
}
That's what I used to test it.
|
|
|
|
Joined: Apr 2003
Posts: 210
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 210 |
Well it gives the filename and line number in 6.1 too. Maybe under some circumstances it doesn't give it, but that would go for 6.03 also.
But yeah, it should be made to always give filename and line number, for all errors.
|
|
|
|
Joined: Feb 2003
Posts: 307
Fjord artisan
|
Fjord artisan
Joined: Feb 2003
Posts: 307 |
next time don't forget to close the if statment with )
try this one alias num { if ($1 == 1) { echo -a The number is one. } else { echo -a Unknown number. }}
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
If you had read I said that is what I used to show that error, I did it intentionally, I do know how to use parenthesis.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
That's what I used to test it. he was testing it, he didnt need a fix, he knew it was invalid format, read posts thoroughly before replying please.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
I wouldn't know, I have never used 6.01, only used this 6.03.
|
|
|
|
Joined: Feb 2003
Posts: 307
Fjord artisan
|
Fjord artisan
Joined: Feb 2003
Posts: 307 |
his text wasn't particulary clear to give that idea. looked more like another guy with the same problem...
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
I am sorry, I gave you that impression, ironic how Phoenix knew what I meant. Is this more clear, can you take it in now? I a m u s i n g m I R C 6 . 0 3 a n d i t d o e s j u s t t h a t * /if: invalid format (line 2, script1.ini)
a l i a s n u m {
i f ( $ 1 == 1 { e c h o - a T h e n u m b e r i s o n e . }
e l s e { e c h o - a U n k n o w n n u m b e r . }
}
Now for the actual clue. T h a t ' s w h a t I u s e d t o t e s t i t.
|
|
|
|
Joined: Dec 2002
Posts: 43
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 43 |
maybe its in a /timer do u have /timer if (conditions) { commands } anywhere in ur code
i may be wrong
|
|
|
|
Joined: Jan 2003
Posts: 7
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Jan 2003
Posts: 7 |
*throws in his advice*
i reckon its from an $iif thingy...
i had this problem a while ago, and i had to sit and wait for it to happen and then look @ a debug thingy to see what caused it...
tis a bit annoying and time consuming but it beats having all those errors :tongue:
|
|
|
|
Joined: Aug 2003
Posts: 37
Ameglian cow
|
Ameglian cow
Joined: Aug 2003
Posts: 37 |
Script errors (not popups) in version 6.03 generally will identify the source file and line number -- although I don't claim to have tested every single script command's behavior when I make an error.
the $iif() identifier, used in a popup such as nicklist, will generally show the uninformative error if there are any problems with the format of the $iif().
|
|
|
|
Joined: Jun 2003
Posts: 32
Ameglian cow
|
Ameglian cow
Joined: Jun 2003
Posts: 32 |
I might be wrong but I believe if errors in events do not show the line number..
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Actually, single-line /if statements dont show a line number.
So focus on /if statements that dont span multiple lines.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Actually, single-line /if statements dont show a line number. Actually it is single line events, single line aliases return the correct error message. on *:open:?:bah: if ($1 = 1 { echo -s hello } << * /if: invalid format alias bah if ($1 = 1 { echo -s hello } << * /if: invalid format (line N, file.mrc) The same for $scriptline.
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Even better still. that should narrow it down considerably.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Yep, narrows it quite a bit really, it's still a bit of a task though with 45 script files.
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
well, to cut down on the work you could try using a global find for something like : if ( and let MIRC do the looking. One line events seem to follow this pattern. if that doesn't work, try using :if (. Hope this helps cut down on your work
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Not my work, I'm not the one with the problem, nor do I have anywhere like 45 script files loaded.
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
Crime: Replying to wrong person in thread Punishment: Box of cookies Implementation: Iori - have a box of animal cracker cookies as I obviously replied to the wrong person
Those who fail history are doomed to repeat it
|
|
|
|
|