Log in

View Full Version : FindObjectmulti



Dangerous Garden Tools
09-05-2007, 12:29 AM
so in my script im trying to use findobjectmulti for yew cutting. so what i have in my script is...
Function FindObjectMulti(var cx, cy: Integer; Text1, Text2, Text3: String; color1, color2, color3, tolerance, Turns: Integer; MultiText, MultiTimes: Boolean): Boolean;
if FindObjectMulti(x, y, 'Tree', 'ree', 'Chop down Tree', 123, 456, 789, 10, 5, True, True) then
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
end;

problem is i always get the error

Line 120: [Error] (12572:1): Identifier expected in script C:\Program Files\SCAR 3.11\Scripts\Yew Smasher.scar

ive been looking around (search button) to see if theirs something i did wrong, i havent really been able to find anything, any help is greatly appreciated. :)

Method
09-05-2007, 12:31 AM
Function FindObjectMulti(var cx, cy: Integer; Text1, Text2, Text3: String; color1, color2, color3, tolerance, Turns: Integer; MultiText, MultiTimes: Boolean): Boolean;
begin
if FindObjectMulti(x, y, 'Tree', 'ree', 'Chop down Tree', 123, 456, 789, 10, 5, True, True) then
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
end;

You forgot a begin. :)

Dangerous Garden Tools
09-05-2007, 12:42 AM
^^ did it already, im just showing the function im using.

Starblaster100
09-05-2007, 08:25 AM
In SRL4 there is no FindObjectMulti.

Check out FindObjCustom