Log in

View Full Version : how to create a repeating loop



supersain
11-02-2007, 02:09 PM
I have no knowledge about scripting, but i think u need a loop for repeating the process again and again
i am training about 6 guys and all of them are lvl 13

i am using Gobbiez! 0.60 Autofighter. created by WT-Fakawi

i have declared 6 players and entered their username and passwords and i have given each of them 30 mins, to train, after 30 mins the script logs out the player and logs in the next player

Now my question is how do i make the script repeat the process again and again
cuz after it's done training 6 players (takes about 180 mins)
it doesn't do anything
i want the script to go back to player 1 and do the samething again and again


Thanks in advance

n3ss3s
11-02-2007, 02:35 PM
This would really belong to Scripting Help, but anyways, thats odd, it should repeat until(False) =/

Did you watch the script go whole time?

You should read a progressreport (if exists) because if you were away, its possible every player got a so far unsolved random, and turned false, so the script stops I think.

Losmoges
11-02-2007, 02:40 PM
This may be a noob answer, but you can use the for loop? Under your setup, declare player name, var etc. Try to do this, except instead of writeln, you paste your program.
program ForLoop;
var a : integer;
begin
for b := 1 to 5 do
begin
Writeln('Hey');
end;
end.
1 to 5 times repeat.. change the 5 into a bigger number for more repeats. Check http://www.villavu.com/forum/showthread.php?t=12917?t=14307&highlight=loop+tutorial for more loops.

HellBoyz
11-02-2007, 02:41 PM
Try to run the script with 15 min per player, if not you will get more randoms and it will stop your player and the script will past to which ever player is still true by it own

supersain
11-02-2007, 03:07 PM
i started it before sleeping
when i woke up
i checked it wasn'tworking, then i logged in to each player
and found out that only 1 of my player was at unsolved random (it was the mime random)
that player was the player (0) (first 1) in the script

you think because of that player, the script didn't repeat the process?

n3ss3s
11-02-2007, 03:22 PM
Well how do you know it ran only 1,8h?

And no, losmoges, first of all that doesnt even compile, plus the script itself can run enough.

Sooo, I think it ran over 1,8h, or some other problems came.