SRL Archive - RS3 Help

Getting errors just from very simple code from a begginer tutorial


warlord94

2015-01-07 17:30:46

Trying to re-learn how to script and am reading The Mayor's very simplistic guide.

program new;
begin
mouse(200, 200, MOUSE_MOVE);
wait(3000);
mouse(50, 50, MOUSE_MOVE);
wait(3000);
fastClick(MOUSE_RIGHT);
writeLn('We just right clicked');
wait(3000);
mouse(300, 30, MOUSE_MOVE);
end;

begin
clearDebug();
setupSRL();
practiceMouse();
end.

I put this into SIMBA and get the following error: Error: Unknown declaration "mouse" at line 3
Compiling failed.

What's going wrong?

J_R

2015-01-07 17:35:39

Add this to the top of your script:

{$DEFINE SMART}
{$I SRL-6/SRL.Simba}

Mainly the 2nd line should fix your issue I think, the first makes it use the SMART client.

Turpinator

2015-01-07 17:42:25

Youre also lacking a declaration for your PracticeMouse procedure/function…

warlord94

2015-01-07 18:04:50

That was it, thanks J_R