mIRC Homepage
Posted By: puxekas if problems on dice. - 16/07/12 08:09 PM
I'm new at this and i cant understand why this does not work.
it works until ($nick rolled...),and "if" doesnt work,can you please help me?


on *:text:!game*:#: {
if ($nick isvoice # || $nick isreg #) { msg $chan you cant do this | return }
if (!$2) { notice $nick Invalid format Use: !game nick1 cash | halt }
set %game $1 $2 $3
msg $chan [game] $2 bet on game @ $nick - cash: $3
:loop
msg $chan [game] $nick rolled $r(1,100) on the dice.
if ($r < 58) { msg $chan $2 lost $3 }
elseif ($r > 58) { msg $chan $2 won $3 }
else { msg $chan reroll | goto loop }
}
Posted By: puxekas Re: if problems on dice. - 16/07/12 08:33 PM
still doesnt work it starts rerolling all the time.
Posted By: maroon Re: if problems on dice. - 17/07/12 02:18 AM
you need to store the result of $r(1,100) in a variable, instead of repeatedly using $r invalidly without specifying a number range and expect it to see the value of a previous usage of $r.
Posted By: puxekas Re: if problems on dice. - 17/07/12 07:25 AM
no help more needed problem solved
Posted By: puxekas Re: if problems on dice. - 17/07/12 08:03 AM
problem solved
Posted By: puxekas SOLVED - 17/07/12 08:04 AM
SOlved
© mIRC Discussion Forums