SRL Archive - FAQ

Exception in Script: Unknown compiler directives at 10:3


XFactorjjw

2013-08-20 20:17:34

I am getting this error when trying to run this script,

Program DraynorTreeCutter; ////////////////////////////////////////////////////
//Simple Draynor Tree Cutter by wayiyi //
//Script cuts trees at draynor village //
//Banks at draynor //
{$DEFINE SMART} //Start at draynor bank or at trees //
{$I SRL/SRL.simba} ///////////////////////////////////////////////////
{$i sps/sps.simba}
Var
x, y, TooLong: Integer;
procedure DeclarePlayers; //this is line 10
var i:integer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
begin
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;

end;

end;

Procedure Login;
begin
SRL_SixHourFix :=true;
Smart_FixSpeed := True;

ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
wait(5000);
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) Hoverskill('Mining', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
4: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
Writeln(Reason);
TerminateScript;
End;
Procedure WalkToTrees;
var
myPath: TPointArray;
begin
FindNormalRandoms;
MakeCompass('N');
SPS_Setup(runescape_surface, ['10_8']);
myPath := [Point(4164, 3610), Point(4141, 3605), Point(4124, 3583), Point(4114, 3561), Point(4113, 3541)];
SPS_WalkPath(myPath);
Wait(RandomRange(650, 1000));
End;
function treeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.01);

if not (FindColorsTolerance(arP, 3492438, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC;
Writeln('AutoColor = ' + IntToStr(arC));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;


Procedure Tree;
var x, y: integer;
begin;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
Repeat
if(not(LoggedIn))then
Exit;
wait(700+random(500));
FindNormalRandoms;
if FindObj (x, y, 'ree', TreeColor, 5) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop down');
wait(6760+random(1000));
end;
Repeat
AntiBan;
wait(476+random(1000));
Until not IsUpText('ree') or (InvFull);
until (InvFull);

end;
procedure WalkToBanker;
Var
myPath:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['10_8']);
myPath := [Point(4357, 3266), Point(4357, 3273), Point(4354, 3293), Point(4332, 3323), Point(4304, 3321), Point(4287, 3314), Point(4302, 3361), Point(4306, 3390), Point(4269, 3364), Point(4260, 3332), Point(4237, 3314), Point(4192, 3314), Point(4152, 3313), Point(4121, 3312), Point(4148, 3351), Point(4185, 3352), Point(4217, 3369), Point(4169, 3396), Point(4143, 3401), Point(4126, 3416), Point(4132, 3460), Point(4119, 3490), Point(4117, 3515), Point(4127, 3536), Point(4111, 3562), Point(4124, 3587), Point(4136, 3604), Point(4161, 3615), Point(4165, 3629)];
SPS_WalkPath(myPath);
wait(2000+random(1500));
end;
Procedure BankToGo;
var x, y: integer;
begin;
MakeCompass('W');
if FindObj (x, y, 'ank', 5661539, 5) then
begin
Mouse(x, y, 2, 2, True);
ChooseOption('ank');
wait(8000+random(1500));
end;
end;
PROCEDURE Banking;
var
i: Integer;
begin
FindNormalRandoms;
begin
InvMouse(10, Mouse_right);
Wait(RandomRange(999, 200));
ChooseOption('ll');
Wait(RandomRange(999, 200));
CloseBank;
Wait(randomRange(1000, 200));
end;
end;



Procedure MainLoop;
begin
WalkToTrees;
TreeColor;
Tree;
WalkToBanker;
Banktogo;
Banking;

end;


begin
SRL_SixHourFix := True;
Smart_FixSpeed := True;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Repeat
WalkToTrees;
TreeColor;
Tree;
WalkToBanker;
Banktogo;
Banking;
Until(false);

end.



This error happens on every script I try :( Please help.


Edit:I found out my error, No need for help anymore, thank you if you're looking at this later and have found out my error.

Sawyer

2013-08-25 21:27:12

Try using Simba tags, as it makes the code easier to read for scripters.

rj

2013-08-25 21:40:32

Change interpreter from Lape to pascalscript: