SRL Archive - Help and Support

how to repeat?


huh26010

2006-04-11 17:09:48

how do you reapeat the whole script it keeps saying variable expected in script right after simply writeing repeat at the end of my script. i have no varriables in the script and dont no wat to put there

XxKanexX

2006-04-11 17:52:26


begin
[b]repeat[/b]
Writeln('Hello');
Wait(10);
[b]until(false);[/b]
end.

phantombmx

2006-04-12 02:46:26

heres how to repeat a certain amount of times.. this is if you dont want it to repeat forever..
procedure Blah; // will repeat stuff; 20 times
var loopcounter:Integer;
begin
repeat
stuff;
loopcounter:= loopcounter + 1
until(loopcounter = 20)
end;

you can incorporate that into the main loop fairly easy..