SRL Archive - OSR Help

Syntax Error?


Mahatna

2012-04-27 15:54:28

Hey guys getting this error When i try to compile:
Error] (22:7): Syntax error at line 21

Heres the chunk i code i think is giving the error:
 Procedure SaveFish;
Var
X, Y:Integer;

Begin

If FindColorSpiralTolerance(X, Y, 1471228 , 325, 394, 771, 661, 20) Or
If FindColorSpiralTolerance(X, Y, 1204732 , 325, 394, 771, 661, 20) Then <------This is the line giving the error!

Begin
MoveMouse(X, Y);
HoldMouse(X, Y, 1);
MoveMouse(361, 84);
ReleaseMouse(361, 84, 1);
End;
End;

Heres the whole code just incase:

program new;

Procedure StartGame;

Begin
MoveMouse(224, 354);
ClickMouse(224, 354, 1);
MoveMouse(379, 330);
ClickMouse(379, 330, 1);
MoveMouse(350, 159);
ClickMouse(350, 159, 1);
End;

Procedure SaveFish;
Var
X, Y:Integer;

Begin

If FindColorSpiralTolerance(X, Y, 1471228 , 325, 394, 771, 661, 20) Or
If FindColorSpiralTolerance(X, Y, 1204732 , 325, 394, 771, 661, 20) Then

Begin
MoveMouse(X, Y);
HoldMouse(X, Y, 1);
MoveMouse(361, 84);
ReleaseMouse(361, 84, 1);
End;
End;

begin
StartGame;
Repeat
SaveFish;
Until(False);
end.

masterBB

2012-04-27 15:59:15

fix'd

If FindColorSpiralTolerance(X, Y, 1471228 , 325, 394, 771, 661, 20) Or FindColorSpiralTolerance(X, Y, 1204732 , 325, 394, 771, 661, 20) Then

Mahatna

2012-04-27 16:05:30

Ahh Because i was using a Function after using Then, Thanks!

masterBB

2012-04-27 16:09:30

It is;
if 1 > 2 or
4 < 2 then

Not;

if 1 > 2 or 
if 4 < 2 then

Mahatna

2012-04-27 16:19:51

From: masterBB
It is;
if 1 > 2 or
4 < 2 then

Not;

if 1 > 2 or 
if 4 < 2 then


Yeah thanks, i knew that just did not realise i had typed it in, so annoying missing little things like that :D.