mIRC Home    About    Download    Register    News    Help

Print Thread
#238325 16/07/12 08:09 PM
Joined: Jul 2012
Posts: 9
P
puxekas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jul 2012
Posts: 9
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 }
}

Last edited by puxekas; 16/07/12 08:33 PM.
Joined: Jul 2012
Posts: 9
P
puxekas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jul 2012
Posts: 9
still doesnt work it starts rerolling all the time.

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Jul 2012
Posts: 9
P
puxekas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jul 2012
Posts: 9
no help more needed problem solved

Last edited by puxekas; 17/07/12 08:03 AM.
Joined: Jul 2012
Posts: 9
P
puxekas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jul 2012
Posts: 9
problem solved

puxekas #238334 17/07/12 08:04 AM
Joined: Jul 2012
Posts: 9
P
puxekas Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jul 2012
Posts: 9
SOlved


Link Copied to Clipboard