SRL Archive - OSR Help

Compiler error


Catnipple

2012-06-13 05:47:11

I'm new to Pascal and everything, but I'm interested in learning so I've been trying to make a simple woodcutting script that burns the logs afterwards, and I'm stuck at the point of chopping the tree..
procedure ChopTree;
var x, y: integer;
begin
repeat
//function FindObj(var cx, cy: Integer; Text: string; Color, Tol: Integer): Boolean;
if FindObj(x, y, 'hop', 3490885, 21) then
Mouse(x, y, 3, 3, false);
ChooseOptions('hop');
repeat
Wait(1200+random(350));
Until not IsUpText('ow') or (InvFull);
until(InvFull);
end;

^and when I try to compile that, I keep getting this error
[Error] (33:8): Unknown identifier 'ChooseOptions' at line 32
So if someone could just kind of point me in the right direction to help me, it'd be greatly appreciated! Thanks in advance.

Google

2012-06-13 11:54:45


ChooseOption('hop');

No S on the end, for future reference if you go to the includes folder there is everything you really need in there. Or you can hit control and click and it will pull up the correct includes file.

putonajonny

2012-06-13 12:02:19

FYI Using WaitOption will be better in case of a laggy connection than ChooseOption :)

Catnipple

2012-06-13 14:16:44

Thanks for the feedback, definitely appreciated!

Catnipple

2012-06-13 15:40:47

I know double posting is frowned upon, but I'm stuck again.. I'm sorry, but I'm on my last leg again haha.


procedure MouseItem(28; true);
begin
if (ExistsItem(28)) then
InvMouse(1, 2);
end;

That bit of code is giving me this error:

[Error] (39:13): Duplicate identifier 'MOUSEITEM' at line 38

I'm trying to make a script to where it chops willow logs, and then burns one so that I can bonfire the rest of them (and yes, this is my first script.).

Gucci

2012-06-13 15:48:30

MouseItem is a SRL function so you can't name the procedure MouseItem. Also you can edit your post instead of double posting

procedure StartFire; // This will start the fire 
begin
InvMouse(28, 3);
if IsUpText('og') then
begin
ClickMouse2(False);
WaitOption('ight', 200);
end;
end;

Use that to start a fire then add another procedure to start adding to bonfire or incorporate it in there