TViYH
2008-11-08 12:21:06
Script:
Used to grab stats of army members.
Tell me what needs improved/fixed.
I also keep getting this error:
Line 51: [Error] (16273:25): comma (',') expected in script
The line of error is expressed in the script above.
Thanks!
program New;
{.include SRL\SRL.scar}
const
NumOfPlayers = 1; // Number of Players
FirstPlayer = 0;
var
i, z: Integer;
SkillsToGet: TStringArray;
procedure DeclarePlayers;
begin
CurrentPlayer := FirstPlayer;
NumberOfPlayers(NumOfPlayers);
SkillsToGet := ['attack', 'fishing'];
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
end;
procedure GetLevels;
begin
if not LoggedIn then Exit;
ClearDebug;
FindNormalRandoms;
try
for i := 0 to High(SkillsToGet) do
begin
Players[CurrentPlayer].Integers[i] := GetSkillLevel(SkillsToGet[i]);
FindNormalRandoms;
end;
except
WriteLn('Error finding skill levels..');
end;
end;
procedure WriteLevels;
var
m: Integer;
begin
WriteLn('TViYH''s Army Stats Grabber');
for m := 0 to High(SkillsToGet) do
begin
for z := 0 to NumOfPlayers-1 do
begin
WriteLn(Players[z].Name ': ' + SkillsToGet[m] + ': ' + IntToStr(Players[z].Integers[m])); //Error Line
end;
end;
end;
procedure LoopPlayers;
begin
LoginPlayer;
repeat
FindNormalRandoms;
GetLevels;
NextPlayer(False);
until(AllPlayersInActive);
WriteLevels;
end;
begin
SetupSRL;
DeclarePlayers;
LoopPlayers;
end.
Used to grab stats of army members.
Tell me what needs improved/fixed.
I also keep getting this error:
Line 51: [Error] (16273:25): comma (',') expected in script
The line of error is expressed in the script above.
Thanks!