A set amount of times?
Say, something like
repeat
{ stuff }
until(3) //the until would make it try 3 times to do stuff
Any way?
A set amount of times?
Say, something like
repeat
{ stuff }
until(3) //the until would make it try 3 times to do stuff
Any way?
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols
Try using the For.. To.. Do Loop
Simba Code:For i:=0 to 3 Do
Begin
Stuff;
MoreStuff;
End;
Mostly Inactive, School
A basic way of doing this would be having an integer that simple increases every time:
Simba Code:I := 0;
repeat
Stuff;
I := I + 1
until(I >= 3)
~Caotom
Or alternatively:
Simba Code:var I: Integer;
I := 0;
repeat
//MyStuff;
Inc(I);
until(I >= 3);
There used to be something meaningful here.
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols
Another loop you can use is While ... Do for example:
Simba Code:var i: Integer;
i := 0
While (i < 5) Do
begin
DoStuff;
IncEx(i, 1);
writeln(IntToStr(i));
end;
- AIO PowerChopper -
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols
There are currently 1 users browsing this thread. (0 members and 1 guests)