
Originally Posted by
riwu
Simba Code:
repeat
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;
How does this break out if no pin is provided or the pin provided is wrong? It will keep trying the wrong pin eternally.
Oh, good point.
Simba Code:
for i:=0 to 3 do
repeat
if PinScreen then
begin
repeat
WriteLn('PinScreen detected! Entering PIN...');
InPin(Players[CurrentPlayer].Pin);
WriteLn('Checking to see if successfully entered.');
wait(1500+random(100));
until (BankScreen) or not (PinScreen);
end;
Better? Will only try 3 times.