Log in

View Full Version : player setup



mrhappy
01-25-2007, 05:30 AM
i am having trouble setting up the player setup in scripts whenever i set it up it comes up with errors

this is how it starts

procedure DeclarePlayers;
begin
HowManyPlayers:= 4;
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Integer1 := 1; //1 - 4 fightmode.
Players[0].Active := True;

Players[1].Name :=''; <=======LINE 60
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Integer1 := 1; //1 - 4 fightmode.
Players[1].Active := True;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Integer1 := 1; //1 - 4 fightmode.
Players[2].Active := True;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Integer1 := 1; //1 - 4 fightmode.
Players[3].Active := True;

end;


and then this is how i have been setting it

procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='myusername';
Players[0].Pass :='mypassword';
Players[0].Nick :='';
Players[0].Integer1 := 1; //1 - 4 fightmode.
Players[0].Active := True;

Players[1].Name :=''; <====== LINE 60
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Integer1 := 1; //1 - 4 fightmode.
Players[1].Active := false;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Integer1 := 1; //1 - 4 fightmode.
Players[2].Active := false;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Integer1 := 1; //1 - 4 fightmode.
Players[3].Active := false;

end;

and i get the error

[Runtime Error] : Out Of Range in line 60 in script D:\d2\SCAR 2.03\Scripts\Autofighter Pentti 2[1]..scar

how do i set this right?

syberium
01-25-2007, 05:56 AM
do this
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='myusername';
Players[0].Pass :='mypassword';
Players[0].Nick :='';
Players[0].Integer1 := 1; //1 - 4 fightmode.
Players[0].Active := True;
{
Players[1].Name :=''; <====== LINE 60
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Integer1 := 1; //1 - 4 fightmode.
Players[1].Active := false;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Integer1 := 1; //1 - 4 fightmode.
Players[2].Active := false;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Integer1 := 1; //1 - 4 fightmode.
Players[3].Active := false;}

end; since u have howmanyplayers=1 make sure u only have 1 player array and make the others comments until u need them

although i woudent reccomend using one player, very risky probably will get banned soon if you use only one. =/

hojos pet
01-29-2007, 12:44 AM
Smart people rox don't they. ;3

Mjordan
01-29-2007, 01:36 AM
or just delete the other ones.