Need a way to repeat a piece of my script for 12 times, then go back to another piece of script and need to repeat again for 12 times.
So kind of this:
Repeat;
stuff;
stuff;
Repeat;
stuff;
untill 12 times
untill unlimited times
Need a way to repeat a piece of my script for 12 times, then go back to another piece of script and need to repeat again for 12 times.
So kind of this:
Repeat;
stuff;
stuff;
Repeat;
stuff;
untill 12 times
untill unlimited times
Simba Code:repeat
repeat
stuff();
inc(i);
until(i >= 12);
repeat
things();
inc(j);
until(j >= 12);
until(false);
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
Thanks for the answer and sorry for my unclear post. I'm looking to also loop that repeat for "infinite" amount of times since its part of the other repeat which repeats for infinite. So in that case I would need to make shitton of variables i,j,k,... which wouldn't be too effective since one variable would only last for 30second ish.
The code i posted will repeat stuff() for 12 times, and then repeat things() for 12 times, infinitely
repeat..until(false) is the method for repeating infinitely
I don't quite understand this bit, if I'm missing something please elaborate and i'll fix it
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
My bad there. Although the problem with that code is that on the first round it loops the i and j for 12 times but after that since the i and j are already over 12 they only come out once.
So like if you make the first one type 1 and second one 2 it comes out like this:
11111111111122222222222212121212121212121212121212 121212
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
Setting the var into 0 at the beginning of the repeat was exactly what I was in need for. Thanks alot for your help![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)