
Originally Posted by
eze01
[Runtime Error] : Out Of Range in line 68 in script C:\DOCUME~1\EzE\LOCALS~1\Temp\SRL4 Guardz! 0.27 PUB-1.scar
It's a problem with the NumberOfPlayers most likely. If you only have one account's information put in, you don't delete all the others or change NumberOfPlayers. I'm guessing that sounds confusing because I find it difficult to explain, so here's an example.
SCAR Code:
Procedure DeclarePlayers;
begin
NumberOfPlayers(2); //Total amount of entries in the players array
CurrentPlayer := 0;
Players[0].Name :='youraccounthere';
Players[0].Pass :='yourpasshere';
Players[0].Nick :='oura';
Players[0].Skill:='auto'; // valid 'attack', 'strength', 'defence' or 'auto'
Players[0].Active:=True; //WE ARE USING THIS PLAYER
Players[0].Loc := 'Bank';
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Skill:='strength';
Players[1].Active:=False; //WE ARE NOT USING THIS PLAYER
Players[1].Loc := 'Bank';
end;
That above array would work. See how there are 2 "accounts" in the array. NumberOfPlayers needs to equal the total amount there are, even if they are blank and inactive like Players[1] is for me.
However, if you change NumberOfPlayers to 1, thinking that you only have one account in there, you will get an Out Of Range error