Ok, so its really starting to piss me off, ho do i break the infinate loop that happens because of NextPlayer!? i cant for the life of me do it, and it makes me rather angry as im impatient.
Ok, so its really starting to piss me off, ho do i break the infinate loop that happens because of NextPlayer!? i cant for the life of me do it, and it makes me rather angry as im impatient.
no haha, when using NextPlayer(false); it brings the script into an infinate loop, and its a piss off haha, so i was wondering if there was a way around that
Actually, it's meant to be like that.
Me and a vast amount of other people have tried to do something, but the devs ands admins do not want to change it for some bizarre reason.
So, yeah, I understand how you feel.
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics
haha ok thanks for clarifying, I was just wondering if i was doing something wrong maybe
SCAR Code:procedure NextPlayer(Active: Boolean);
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
WriteLn('NextPlayer(Active: ' + BoolToStr(Active)+ ');');
Players[CurrentPlayer].Active := Active;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
end;
SRL_Logs := SRL_Logs + 1;
LoginPlayer;
end;
end;
SCAR Code:while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
end;
What is there to explain?
Endless loop.
Edit: Can't we replace that endless loop with TerminateScript, so ScriptTerminate can get an even more significant role in scripts?
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics
The one downside to changing that would be if you had an active playerform, where you could reset your players and keep the script running, the current loop would allow you to do that.
That infinite loop should never be a problem, though. If all your players are inactive, why would you want to do anything else?
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics






Oh well next revision you should be able to bypass the need to break the loop anyway.
There are currently 1 users browsing this thread. (0 members and 1 guests)