SRL Archive - Help

Identifier expected Error?


Hult

2012-12-21 12:41:53

Getting this error;
[Error] C:\Users\Hult\Desktop\TestColor.simba(34:4): Identifier expected at line 33
Compiling failed.


Here's my code.

program AutoFighter;

Procedure Mouse;
Begin
wait(200)
movemouse (231,214);
wait(200)
clickmouse (231,214, 1)
End;

Procedure FindNPC;
var
x, y:Integer;
Begin
if FindColorSpiralTolerance(x, y, 2839893, 9, 30, 516, 360, 20) or
FindColorSpiralTolerance(x, y, 2118732, 9, 30, 516, 360, 20) or
FindColorSpiralTolerance(x, y, 4352352, 9, 30, 516, 360, 20) or
FindColorSpiralTolerance(x, y, 2243140, 9, 30, 516, 360, 20) Then

Begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(1000)
End;



Begin
Repeat
Mouse;
FindNPC;
until (IsKeyDown (123)); //Press f3 to stop
End.

Le Jingle

2012-12-21 12:46:34

You have two begin's in your FindNPC procedure. (Delete the second)

I'd note that -> I wouldn't use this code in real/actual RS, as it may very easily get you banned rather fast.

Gucci

2012-12-22 02:10:16

You should replace movemouse with MMouse and clickmouse with ClickMouse2 (action) those are much better and much less botlike

mr. pali

2012-12-22 02:33:24

From: Le Jingle
You have two begin's in your FindNPC procedure. (Delete the second)

I'd note that -> I wouldn't use this code in real/actual RS, as it may very easily get you banned rather fast.



do not delete the second begin, simply add a second end; after the wait(1000).

To randomize scripts, to be less detectable, a good place to start is using the randomrange procedure.

Try Wait(randomrange(800,1200)); This will wait somewhere between 800 and 1200 MS every time it is called.

you can use randomrange within other procedures as well, not just with wait.

rj

2012-12-22 14:36:39

From: mr. pali
do not delete the second begin, simply add a second end; after the wait(1000).

To randomize scripts, to be less detectable, a good place to start is using the randomrange procedure.

Try Wait(randomrange(800,1200)); This will wait somewhere between 800 and 1200 MS every time it is called.

you can use randomrange within other procedures as well, not just with wait.


Same thing:
Wait(800 + Random(400));