mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2017
Posts: 8
G16 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Oct 2017
Posts: 8
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,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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
}

Joined: Oct 2017
Posts: 8
G16 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Oct 2017
Posts: 8
LoL
Thanks man, you rock!


Link Copied to Clipboard