Can someone please help me sort this out. Sorry it is a little long, but trying to clean up / learn from this. This is the Main Loop, but my players only log in each once then the script stops.
SCAR Code:
begin
SetUpSRL;
ScriptID :='95';
beginscript;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
activateclient;
If Not(loggedin) Then
LoginPlayer;
If (LoggedIn) Then
Begin
Repeat
Repeat
cuttree;
until(Invfull)
burn;
dropit;
ProgressReport;
Until(LoadsToFinish <= Loads)
if (LoadsToFinish <= Loads) Then
Begin
ProgressReport;
Writeln('Logging on to next player...')
ProgressReport;
Logout;
NextPlayer(True);
begin
if not loggedin then
RandomNextPlayer(True);
end;
End;
end;
If Not(loggedin) Then
LoginPlayer;
If (LoggedIn) Then
Begin
Repeat
Repeat
cuttree;
until(Invfull)
burn;
dropit;
ProgressReport;
Until(LoadsToFinish <= Loads)
if (LoadsToFinish <= Loads) Then
Begin
ProgressReport;
Writeln('Logging on to next player...')
ProgressReport;
Logout;
NextPlayer(true);
begin
if not loggedin then
RandomNextPlayer(True);
end;
End;
If Not(loggedin) Then
LoginPlayer;
If (LoggedIn) Then
Begin
Repeat
Repeat
cuttree;
until(Invfull)
burn;
dropit;
ProgressReport;
Until(LoadsToFinish <= Loads)
if (LoadsToFinish <= Loads) Then
Begin
ProgressReport;
Writeln('Logging on to next player...')
ProgressReport;
Logout;
NextPlayer(true);
begin
if not loggedin then
LoginPlayer;
end;
end;
End;
end;
end.
so then I modified it down to
SCAR Code:
begin
SetUpSRL;
ScriptID :='95';
beginscript;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
activateclient;
If Not(loggedin) Then
LoginPlayer;
If (LoggedIn) Then
Begin
Repeat
Repeat
cuttree;
until(Invfull)
burn;
dropit;
ProgressReport;
Until(LoadsToFinish <= Loads)
if (LoadsToFinish <= Loads) Then
Begin
ProgressReport;
Writeln('Logging on to next player...')
ProgressReport;
Logout;
NextPlayer(true);
begin
if not loggedin then
LoginPlayer;
end;
end;
End.
But then it logs them in, but never do they do anything, they just stand there, then log out, and back in.
Can someone illuminate how I should run this Main Loop properly?
Thanks a million in advance