mIRC Homepage
Posted By: Trashlord_ While loop continue function - 04/11/07 07:21 PM
Code:
alias mdeop {
var %i = $nick($chan,0)
while (%i) {
if ($nick($chan,%i) == $me) { continue }
var %t = %t $nick($chan,%i)
<rest is not important>
dec %i
}
}


The continue function used in this type of loop, freezes mIRC, I have to press ctrl + break to kill the loop and regain control.

I use 6.31, Windows XP Service Pack 2.
Posted By: schaefer31 Re: While loop continue function - 04/11/07 07:29 PM
That should be expected if you consider what the continue command does. As soon as $nick($chan,%i) evaluates to your nick, the code jumps directly back to the top of the loop and the line 'dec %i' is never executed from that point on. Wash, rinse, repeat.
Posted By: Trashlord_ Re: While loop continue function - 04/11/07 07:34 PM
Right, tested it, not a bug, thanks for the info.

© mIRC Discussion Forums