cbris
2008-08-18 19:10:02
in writing a simple script that takes advantage of reflection, i came across this error in WalkToBar when using WalkToTile.
Semicolon (';') expected in script
This is odd because the code contains all the semicolon that it should. Is there something i dont know? (PathToBar is called before WalkToBar in main loop).
any help would be great.
It is probably i really easy fix. :redface:
EDIT: It appears it is something to do with PathToBar: TPointArray;. when i change the line to this, the problem goes away.
Semicolon (';') expected in script
This is odd because the code contains all the semicolon that it should. Is there something i dont know? (PathToBar is called before WalkToBar in main loop).
function PathToBar: TPointArray;
begin
SetLength(Result, 8);
Result[0] := Point(2951, 3376); //t outside of bank
Result[1] := Point(2956, 3381); //t north of bar
Result[2] := Point(2956, 3374); //*******
Result[3] := Point(2956, 3372); //
Result[4] := Point(2956, 3371); //bar positions
Result[5] := Point(2956, 3370); //
Result[6] := Point(2957, 3373); //
Result[7] := Point(2957, 3372); //*******
end;
procedure WalkToBar;
begin
WalkToTile(PathToBar[0], 2, 0); //error on this line!
wait(500+random(500));
WalkToTile(PathToBar[2], 2, 0);
wait(500+random(500));
WalkToTile(PathToBar[2+random(5)], 0, 0);
{ case random(5) of
0: WalkToTile(PathToBar[2], 0, 0);
1: WalkToTile(PathToBar[3], 0, 0);
2: WalkToTile(PathToBar[4], 0, 0);
3: WalkToTile(PathToBar[5], 0, 0);
4: WalkToTile(PathToBar[6], 0, 0);
5: WalkToTile(PathToBar[7], 0, 0);
end;}
Wait(1000+Random(500));
end;any help would be great.
It is probably i really easy fix. :redface:
EDIT: It appears it is something to do with PathToBar: TPointArray;. when i change the line to this, the problem goes away.
WalkToTile(Point(2951, 3376), 2, 0);