mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#46573 02/09/03 04:46 PM
B
BoredNL
BoredNL
B
* /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.

#46574 02/09/03 04:58 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
I am using mIRC 6.03 and it does just that.
* /if: invalid format (line 2, script1.ini)
Code:
alias num {
  if ($1 == 1 { echo -a The number is one. }
  else { echo -a Unknown number. }
}

That's what I used to test it.

#46575 02/09/03 05:05 PM
S
saxon
saxon
S
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.

#46576 02/09/03 05:06 PM
Joined: Feb 2003
Posts: 306
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 306
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. }}

#46577 02/09/03 05:10 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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.

#46578 02/09/03 05:12 PM
P
pheonix
pheonix
P
Quote:
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. mad

#46579 02/09/03 05:15 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
I wouldn't know, I have never used 6.01, only used this 6.03.

#46580 02/09/03 05:20 PM
Joined: Feb 2003
Posts: 306
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 306
his text wasn't particulary clear to give that idea.
looked more like another guy with the same problem...

#46581 02/09/03 05:44 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
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)


Code:
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.

#46582 02/09/03 06:09 PM
P
psycogod
psycogod
P
maybe its in a /timer
do u have
/timer if (conditions) { commands }
anywhere in ur code

i may be wrong

#46583 02/09/03 08:59 PM
M
Matteh
Matteh
M
*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:

#46584 02/09/03 10:05 PM
R
rbhibbs
rbhibbs
R
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().

#46585 03/09/03 12:56 AM
W
WatchMinister
WatchMinister
W
I might be wrong but I believe if errors in events do not show the line number..

#46586 03/09/03 01:10 AM
Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
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!
#46587 05/09/03 08:29 PM
I
Iori
Iori
I
Quote:
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.

#46588 05/09/03 10:22 PM
Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
Even better still. that should narrow it down considerably.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#46589 05/09/03 10:36 PM
I
Iori
Iori
I
Yep, narrows it quite a bit really, it's still a bit of a task though with 45 script files. laugh

#46590 05/09/03 10:45 PM
Joined: Dec 2002
Posts: 1,536
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,536
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
#46591 05/09/03 10:53 PM
I
Iori
Iori
I
Not my work, I'm not the one with the problem, nor do I have anywhere like 45 script files loaded. grin

#46592 06/09/03 06:24 PM
Joined: Dec 2002
Posts: 1,536
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,536
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 smile smile smile


Those who fail history are doomed to repeat it
Page 1 of 2 1 2

Link Copied to Clipboard