Log in

View Full Version : Help with player array.



SuperRitsu
11-03-2007, 05:44 AM
Sorry I'm fairly new but whenever i load ANY script it shows this error.
I tried posting this in pwnaz0r's secret cutter wc thread hoping for an answer but since i didn't get one yet I just felt the need to ask here because I can't use ANY of the scripts except for pwnaz0r's mining script mainly because it doesn't have this player array thing.
Well could anyone help fix this for me once and for all?
I want to try and do other things like woodcutting and goblin killing scripts.

This is all my inputs into it, and I just wanted to use one guy for this.

[Runtime Error] : Out Of Range in line 53 in script C:\Documents and Settings\Compaq_Administrator\Desktop\SCAR\Scripts \[Rip-It] SecretCutter v0.10.scar

Heres what i input into it.

procedure DeclarePlayers;
begin
HowManyPlayers := 0;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SRLID := MySRLID;
SRLPassword := MySRLPassword;

Players[0].Name :='Superbox808'; //Character name
Players[0].Pass :='*********'; //Character PAss
Players[0].Nick :='erb'; //Nickname 3 Letter of char name
Players[0].Active := True;
Players[0].Loc := 'Trees';
Players[0].Integers[0] := 1; //how many loads for this player to chop
Players[0].Integers[1] := 0;
Players[0].Integers[2] := 0;
Players[0].Integers[3] := 0;

Any help would be appreciated!

Rikje
11-03-2007, 06:48 AM
HowManyPlayers := 0;

HowManyPlayers := 1;
(cause you use 1 one player ;)
i would advice you to read a guide like:
http://www.villavu.com/forum/showthread.php?t=5410

SuperRitsu
11-03-2007, 07:30 AM
Read it but it has like 7 players for set up.
It would be handy if I actually had that much but so far I only made 1 bot out of laziness.
I'll try out your correction you pointed out to me and see if that has any results.

SuperRitsu
11-03-2007, 07:52 AM
Your suggestion didn't work.
Here i even put in what you told me to put.

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

ManyPlayers);
CurrentPlayer := 0;

SRLID := MySRLID;
SRLPassword := MySRLPassword;

Players[0].Name :='Superbox808'; //Character name
Players[0].Pass :='*******'; //Character PAss
Players[0].Nick :='rbo'; //Nickname 3 Letter of char name
Players[0].Active := True;
Players[0].Loc := 'Trees';
Players[0].Integers[0] := 1; //how many loads for this player to chop
Players[0].Integers[1] := 0;
Players[0].Integers[2] := 0;
Players[0].Integers[3] := 0;

Players[1].Name :=''; //Character name
Players[1].Pass :=''; //Character PAss
Players[1].Nick :=''; //Nickname 3 Letter of char name
Players[1].Active := False;
Players[1].Loc := 'Trees';
Players[1].Integers[0] := 1; //how many loads for this player to chop
Players[1].Integers[1] := 0;
Players[1].Integers[2] := 0;
Players[1].Integers[3] := 0;

Players[2].Name :=''; //Character name
Players[2].Pass :=''; //Character PAss
Players[2].Nick :=''; //Nickname 3 Letter of char name
Players[2].Active := False;
Players[2].Loc := 'Trees';
Players[2].Integers[0] := 1; //how many loads for this player to chop
Players[2].Integers[1] := 0;
Players[2].Integers[2] := 0;
Players[2].Integers[3] := 0;

Players[3].Name :=''; //Character name
Players[3].Pass :=''; //Character PAss
Players[3].Nick :=''; //Nickname 3 Letter of char name
Players[3].Active := False;
Players[3].Loc := 'Trees';
Players[3].Integers[0] := 1; //how many loads for this player to chop
Players[3].Integers[1] := 0;
Players[3].Integers[2] := 0;
Players[3].Integers[3] := 0;

Players[4].Name :=''; //Character name
Players[4].Pass :=''; //Character PAss
Players[4].Nick :=''; //Nickname 3 Letter of char name
Players[4].Active := False;
Players[4].Loc := 'Trees';
Players[4].Integers[0] := 1; //how many loads for this player to chop
Players[4].Integers[1] := 0;
Players[4].Integers[2] := 0;
Players[4].Integers[3] := 0;

Writeln('Using '+ IntToStr(HowManyPlayers) +' Players.');

end;

But now my error is in here.
[Runtime Error] : Out Of Range in line 63 in script C:\Documents and Settings\Compaq_Administrator\Desktop\SCAR\Scripts \[Rip-It] SecretCutter v0.10.scar

At least the error isn't in line 53 anymore?

Hey321
11-03-2007, 01:37 PM
Put a { before Players[1].Name :=''; //Character name and a } after Players[4].Integers[3] := 0;


Should fix it.

SuperRitsu
11-03-2007, 09:47 PM
Alright I'll try it out then.
Hopefully that should put an end to all my problems and I could finally use some scripts.

SuperRitsu
11-03-2007, 09:55 PM
Yes it works!
Thanks a lot Hey321!!
Finally I could do other things other than mining now.
Really appreciate the help :)