mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
/if /if /if dang it! :( #46573 02/09/03 04:46 PM
Joined: Jan 2003
Posts: 154
B
BoredNL Offline OP
Vogon poet
OP Offline
Vogon poet
B
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]
Re: /if /if /if dang it! :( #46574 02/09/03 04:58 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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.

Re: /if /if /if dang it! :( #46575 02/09/03 05:05 PM
Joined: Apr 2003
Posts: 210
S
saxon Offline
Fjord artisan
Offline
Fjord artisan
S
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.

Re: /if /if /if dang it! :( #46576 02/09/03 05:06 PM
Joined: Feb 2003
Posts: 307
T
tontito Offline
Fjord artisan
Offline
Fjord artisan
T
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. }}

Re: /if /if /if dang it! :( #46577 02/09/03 05:10 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
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.

Re: /if /if /if dang it! :( #46578 02/09/03 05:12 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
Re: /if /if /if dang it! :( #46579 02/09/03 05:15 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I wouldn't know, I have never used 6.01, only used this 6.03.

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

Re: /if /if /if dang it! :( #46581 02/09/03 05:44 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
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)


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.

Re: /if /if /if dang it! :( #46582 02/09/03 06:09 PM
Joined: Dec 2002
Posts: 43
P
psycogod Offline
Ameglian cow
Offline
Ameglian cow
P
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

Re: /if /if /if dang it! :( #46583 02/09/03 08:59 PM
Joined: Jan 2003
Posts: 7
M
Matteh Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
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:

Re: /if /if /if dang it! :( #46584 02/09/03 10:05 PM
Joined: Aug 2003
Posts: 37
R
rbhibbs Offline
Ameglian cow
Offline
Ameglian cow
R
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().

Re: /if /if /if dang it! :( #46585 03/09/03 12:56 AM
Joined: Jun 2003
Posts: 32
WatchMinister Offline
Ameglian cow
Offline
Ameglian cow
Joined: Jun 2003
Posts: 32
I might be wrong but I believe if errors in events do not show the line number..

Re: /if /if /if dang it! :( #46586 03/09/03 01:10 AM
Joined: Feb 2003
Posts: 2,623
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,623
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!
Re: /if /if /if dang it! :( #46587 05/09/03 08:29 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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.

Re: /if /if /if dang it! :( #46588 05/09/03 10:22 PM
Joined: Feb 2003
Posts: 2,623
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,623
Even better still. that should narrow it down considerably.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: /if /if /if dang it! :( #46589 05/09/03 10:36 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
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. laugh

Re: /if /if /if dang it! :( #46590 05/09/03 10:45 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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
Re: /if /if /if dang it! :( #46591 05/09/03 10:53 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
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. grin

Re: /if /if /if dang it! :( #46592 06/09/03 06:24 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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