trojan
2011-04-29 09:48:27
I made this code so that if a function fails, it is just called again 3 times. However, I think the script just takes the returned value of false from the last time the function was called or something? is there a way around this?
Procedure DoAction(Stage :variant);
begin
Repeat
if not Stage then //This calls the function.
begin
Writeln('Trying again');
Writeln('On the ' + IntToStr(Tries) + ' try');
inc(Tries);
Wait(500 + Random(500));
end else
begin
Tries := 0
Break;
end;
until (Tries > 3);
if tries > 3 then
begin
Writeln('Action Failed 4 times :/');
Logout;
Exit;
end;
end;