All pastes #419082 Raw Edit

Something

public text v1 · immutable
·published 2007-04-01 01:12 UTC
rendered paste body
This loop works

while(1)
{

$digits=$AGI->get_data('slots_bet_amount',10000,1);
$betamount=$digits;

$usercredits -= $betamount;

$AGI->exec('Playback','slot_insert');

}

This loop doesnt

while(1)
{

$digits=$AGI->get_data('slots_bet_amount',10000,1);
$betamount=$digits;

$usercredits -= $betamount;

$AGI->exec('Playback','slot_insert');
$r1=spin_reel();
$r2=spin_reel();
#print "r2=$r2\n";
#print "r1=$r1\n";
$r3=spin_reel();

if($DEBUG)
{
print "r1=$r1\n";
print "r2=$r2\n";
print "r3=$r3\n";
}

$r1=$reel_prob[$r1];
$r2=$reel_prob[$r2];
$r3=$reel_prob[$r3];
$rstring=$r1.":".$r2.":".$r3;
$pay=$payout_array{$rstring};
if($DEBUG)
{
print "rstring=$rstring\n";
}
if(!$pay)
{
        $pay="0";
}
else
{
#       $AGI->exec('Playback','cash');
}

$pay=$pay*$betamount;
#$AGI->exec('AGI',"swift-script.pl|\"reels $reel_nm{$r1} $reel_nm{$r2} $reel_nm{$r3} payout $pay dollars\"");
$usercredits += $pay;
if($pay)
{
#$AGI->exec('AGI',"swift-script.pl|\"Congratulations, you won $pay dollars!\"");
}
print "Current Credit Balance: $usercredits\n";
#$AGI->exec('AGI',"swift-script.pl|\"Current Credit Balance: $usercredits\"");
}