mIRC Home    About    Download    Register    News    Help

Print Thread
G
G16
G16
G
Code
Quote:

/hmake guessgame
/hmake score

on *:text:!guess *:#:{
if ($regex($2,^[1-24]$)) {
/hadd -ms guessgame $nick $2-
}
}

on *:text:!winner *:#:{
var %w = $hfind(guessgame, $2-,0).data
var %i = 1
while (%i <= %w){ ;<-- this was incorrect
//echo -a $hfind(guessgame, $2-,1).data
/hdel guessgame $hfind(guessgame, $2-,1).data
inc %i
}
}

Last edited by G16; 18/10/17 03:29 AM. Reason: question was solved
Joined: Jan 2004
Posts: 2,081
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
the first time you had the curly brace touching the parenthesis in front of it, the 2nd time you had the curly brace on the next line. Just have the curly brace on same line as the while:

Code:
while (condition to end loop) {
  stuff
}

G
G16
G16
G
LoL
Thanks man, you rock!


Link Copied to Clipboard