SRL Archive - OSR Help

YoHoJoSRL Save the goldfish script- HELP


vulkar

2013-04-10 14:20:35

Ok so i watched his video on how to make a script for save the goldfish, when i look my code is the exact same as his is. But for some reason when i compile to check for errors i get an error that he didn't please take a look at my code and help me.

program SaveTheGoldfish;


procedure StartGame;
Begin
MoveMouse (341, 572);
ClickMouse (341, 572, 1);
Wait (500);
MoveMouse (499, 541);
ClickMouse (499, 541, 1);
Wait (500);
MoveMouse (449, 370);
ClickMouse (449, 370, 1);
End;

procedure savegoldfish
var
x, y:Integer;

begin
if findcolorspiraltolerance (x, y, 13260 , 118, 239, 377, 474, 20) or
if findcolorspiraltolerance (x, y, 1471228, 118, 239, 377, 474, 20) or
if findcolorspiraltolerance (x, y, 676092 , 118, 239, 377, 474, 20) or
if findcolorspiraltolerance (x, y, 1204732, 118, 239, 377, 474, 20) or
if findcolorspiraltolerance (x, y, 735742 , 118, 239, 377, 474, 20) then
begin
MoveMouse (x, y);
HoldMouse (x, y, 1);
MoveMouse (486, 245);
ReleaseMouse (486, 245, 1);
end;
end;



begin
StartGame;
repeat
savegoldfish;
until (false);

end.


If you take a look at the Procedure savegoldfish, right under it is the var followed by x, y:Integer;. But when i compile script it says that var is not valid or something here is a screenshot of my screen when this happens to me.

t4q

2013-04-10 14:23:50

procedure savegoldfish;
you are missing ';'

vulkar

2013-04-10 14:34:31

thanks that fixed that problem but im getting more errors.

Here is where it says the error is




t4q

2013-04-10 14:50:47

remove If's after or's

 if findcolorspiraltolerance (x, y,  13260  , 118, 239, 377, 474, 20) or
findcolorspiraltolerance (x, y, 1471228, 118, 239, 377, 474, 20) or
findcolorspiraltolerance (x, y, 676092 , 118, 239, 377, 474, 20) or
findcolorspiraltolerance (x, y, 1204732, 118, 239, 377, 474, 20) or
findcolorspiraltolerance (x, y, 735742 , 118, 239, 377, 474, 20) then