mIRC Home    About    Download    Register    News    Help

Print Thread
#156795 20/08/06 11:37 AM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
Hi
I am not sure whats wrong witht this short script but my mIRC crashes every time i run it, Its supposed to say every nick on the channel besides mine. I use the latest version. The actual script seems to work ok but it always crashes my client. please tell me how i can improve it

/an {
var %a = 1
while %i <= $nick(#,0) {
if $nick(#,%i) != $me {
say $nick(#,%i)
}
inc %a
}
}


Newbie
#156796 20/08/06 11:40 AM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
It looks like you're messing up the %a and the %i

/an {
var %a = 1
while %a <= $nick(#,0) {
if $nick(#,%a) != $me {
say $nick(#,%a)
}
inc %a
}
}

#156797 20/08/06 12:15 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
Heh yes, i should have spotted that. <3 blush


Newbie
#156798 20/08/06 12:21 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Just a reminder about mIRC freezes. If it's caused by doing something extremely slow, such as using $findfile to count all the files below C:\ then your choice are to either wait out the search or kill mIRC.

However, if it's caused by mIRC becoming stuck inside an infinite loop, you can escape them by holding down the control-break key-combination, instead of having to kill your mIRC and restart. As you break out of the script, you'll see a message telling what scriptname/line-number it broke at. This line sometimes indicates a location *near* the problem causing the loop, but it's also possible that the break may sometimes just *happen* to exit from a subroutine or $identifier far away from the problem.


Link Copied to Clipboard