Log in

View Full Version : Compiling help



zluo
04-18-2012, 08:36 AM
Ok i have just finished my first script (which is for a private server) and i have no idea what i am doing wrong with the compiling. It is a woodcutter to firemaker script.
program WCandFM;
{$i SRL/SRL.simba}

var
x,y:Integer;

const
TreeColour = 22664;
TreeColourTolerance = 3;
StumpColour = 4489384;

procedure AntiBan;
begin
Case Random (2500) of
0..18: Begin SleepAndMoveMouse(5000 + Random(750)); End;
19..24: Begin RandomRClick; End;
25..42: Begin PickUpMouse; End;
43..48: Begin MissMouse(100,100); End;
49..54: Begin RandomRClick; End;
55..60: Begin PickUpMouse; End;
61..66: Begin RandomMovement; End;
67..72: Begin BoredHuman; End;
73..78: Begin RandomRClick; End;
End;
end;

procedure ChopTree
begin
repeat
if FindColorSpiralTolerance(x, y, TreeColour, 0, 0, 515, 337, TreeColourTolerance) then //finding and clicking the tree
writeln('Found tree and chopping it down.');
Mouse (x ,y ,0 , 0, True);
repeat
Wait(RandomRange(2000, 3000)) //antiban stuff (though I might not really need, its good practise)
AntiBan;
Until not(FindColorSpiralTolerance(x, y, 3436712, 0, 0, 515, 337, 2) or (FindColorSpiralTolerance (x, y, 3029313, 653, 438, 669, 449, 20)) = False //detects fallen tree and/or full inventory
until not (FindColorSpiralTolerance (x, y, 3029313, 653, 438, 669, 449, 20); //detects full inventory
Writeln('Full inventory, starting to firemake.');
end;

Procedure Firemake;
begin
repeat
Mouse(706, 444, 10, 10, True); //clicking tinderbox
wait (300+Random(100));
Mouse(663, 444, 10, 10, True); //clicking log
wait (1700+Random(100));
until (FindColorSpiralTolerance (x, y, 3029313, 653, 438, 669, 449, 20));
Writeln('Finished lighting all the logs)
end;

procedure main;
begin
repeat
ChopTree;
Firemake;
until(false);
end;

begin
ClearDebug;
SetUpSrl;
ActivateClient;
main;
end.
so does anybody know what im doing wrong? sorry if its a simple answer, i have never really finished reading the tuts that i need to read. most my learning comes from reading others' scripts and from the help of this community.

Markus
04-18-2012, 08:39 AM
missing a ' at the end of the writeln in procedure Firemake;

zluo
04-18-2012, 08:47 AM
ah crap thanks, and also just noticed there was no semicolon after procedure choptree.

Caotom
04-18-2012, 08:48 AM
You're also missing a ; after (Line 27) procedure ChopTree
A second ) after (line 36) Until not(FindColorSpiralTolerance(x, y, 3436712, 0, 0, 515, 337, 2)
Same as above on line 37.
Missing a ' at the end of (line 49) Writeln('Finished lighting all the logs)

~Caotom