I have followed his guide and looked carefully at my script but I cant see what i've done wrong. It is for his SaveTheGoldFish
Here's what Ive got so far,
My error message is "Exception: Range check error at line 20"
Thanks in advance
I have followed his guide and looked carefully at my script but I cant see what i've done wrong. It is for his SaveTheGoldFish
Here's what Ive got so far,
My error message is "Exception: Range check error at line 20"
Thanks in advance
Can you post the code in simba tags
Current Project: Retired
Sorry first time, ill do it now
your script compiled ok for me? does it error when run?
Simba Code:program SaveTheFish;
procedure StartGame;
begin
MoveMouse(319, 654);
ClickMouse(319, 654, 1);
Wait(1500);
MoveMouse(477, 627);
ClickMouse(477, 627, 1);
Wait(500);
MoveMouse(426, 453);
ClickMouse(426, 453, 1);
End;
Procedure SaveGoldFish;
var
x, y:Integer;
begin
If FindColorSpiralTolerance(x, y, 172287 , 97, 256, 337, 430, (20)) or
FindColorSpiralTolerance(x, y, 556031 , 97, 256, 337, 430, 20) or
FindColorSpiralTolerance(x, y, 1204732 , 97, 256, 337, 430, 20) or
FindColorSpiralTolerance(x, y, 416254 , 97, 256, 337, 430, 20) or
FindColorSpiralTolerance(x, y, 75960 , 97, 256, 337, 430, 20) Then
Begin
MoveMouse(x, y);
HoldMouse(x, y, 1);
MoveMouse(448, 271);
ReleaseMouse(448, 271, 1);
end;
end;
begin
StartGame;
Repeat
SaveGoldfish;
until(false);
end.
Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling
It doesn't even run the first few steps, It just compiles then gives me an error on line 20.
P.S. How do I post my script like that?
try this script (srl extension in Simba must be enabled):
Simba Code:program SaveTheFish;
{$I SRL/SRL.Simba}
procedure StartGame;
begin
MMouse(319, 654,0,0);
ClickMouse2(mouse_left);
Wait(1500);
MMouse(477, 627,0,0);
ClickMouse2(mouse_left);
Wait(500);
MMouse(426, 453,0,0);
ClickMouse2(mouse_left);
End;
Procedure SaveGoldFish;
var
x, y:Integer;
begin
If FindColorSpiralTolerance(x, y, 172287 , 97, 256, 337, 430, (20)) or
FindColorSpiralTolerance(x, y, 556031 , 97, 256, 337, 430, 20) or
FindColorSpiralTolerance(x, y, 1204732 , 97, 256, 337, 430, 20) or
FindColorSpiralTolerance(x, y, 416254 , 97, 256, 337, 430, 20) or
FindColorSpiralTolerance(x, y, 75960 , 97, 256, 337, 430, 20) Then
Begin
MMouse(x, y,0,0);
HoldMouse(x, y, 1);
MMouse(448, 271,0,0);
ReleaseMouse(448, 271, 1);
end;
end;
begin
SetupSRL;
StartGame;
Repeat
SaveGoldfish;
until(false);
end.
Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling
That looks like it will work, I just need to adjust my client coordinates. What did you change?
There are currently 1 users browsing this thread. (0 members and 1 guests)