SRL Archive - Help and Support

Login Error... :(


Bam Bam

2006-05-21 01:39:48

I'm making a chicken killer that is compatable with the new update but i get a runtime error when i try to test what i have done, it seems like it should have worked but can someone please tell me what i am doing wrong. The player arrays still confuse me…

program BBChicken;
{.include srl\srl.scar}
{.include srl\srl\skill\fighting.scar}

Const

Color1 = 78273; //Monster color 1
color2 = 28728; //Monster color 2
color3 = 83783; //Monster color 3
Feather = 37637; //Feather Color

procedure DeclarePlayers;
begin
HowManyPlayers:= 2;

NumberOfPlayers(HowManyPlayers);

Players[1].Name :='whoops';
Players[1].Pass :='whoops';
Players[1].Nick :='tcr';
Players[1].Active:=True;

Players[2].Name :='whoops';
Players[2].Pass :='whoops';
Players[2].Nick :='tcr';
Players[2].Active:=True;

end;

Procedure Antis;
Begin
FindNormalRandoms;
AntiBan;
FindCerter;
FindScapeRune;
RotateEvery(5);
End;

Procedure Item;
Begin
If (FindObject(x,y,'Feather',feather,10,true))then begin
CMMouse(x, y, 15, 15);
CMouse(x,y,5,5, true);
end;
If (FindObject(x,y,'Feather',feather,10,true))then begin
CMMouse(x, y, 15, 15);
CMouse(x,y,5,5, true);
end;
end;

Procedure Fight;
Begin
if (FindMonster(Color1, Color2, Color3, 10, 'Chicken')) then
begin
Item;
end;
End;

Procedure Setup;
Begin
SetupSRL;
ActivateClient;
end;

begin
Setup;
If (not(loggedin)) then LoginPlayer;
HighestAngle;
ChatsOff;
end.

Sneaks into edit and hopes no one notices

weaselforce

2006-05-21 02:02:47

ive never actually used the declare players. But it appears your missing some required parts. check in your SRL folder under scripts. There is a template by fawki in der that has some of the finer points of SRL already laid out and it has all the things outlined for multiple players. If this is one of your first scripts dont add multiple player support.

Bam Bam

2006-05-21 02:05:32

it's 2am…maybe im just tired…

WT-Fakawi

2006-05-21 03:04:53

You never call DeclarePlayer from your script :)

So, you haven't decared any Players!