SRL Archive - FAQ

findobjcustom


alucard123

2012-09-07 23:10:17

procedure MainLoop;

begin
if (not(srl_infight)) then
begin
FindObjCustom(x2, y2, ['Bone', 'ones'], [10461606, 13751258],2);
begin
wait(10+random(100));
ClickMouse2(false);
wait(500+random(500));
ChooseOption('ones');
FFlag(2);
end;
atkprocedure;
end;
While srl_inFight do Antiban;//decent antiban

end;

debug
Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.



can some1 explain me plz

riwu

2012-09-08 00:44:21

Seems like not to do with the FindObjCustom. Post the rest of the script.
Also you should do a boolean check:
if FindObjCustom() then

alucard123

2012-09-16 11:50:29

i beleive it was trying to click outside smart screen

Vinyl Scratch

2012-09-16 13:07:28

procedure MainLoop;
var
x, y: integer;
begin
if (not(srl_infight)) then //need to double space
begin
if FindObjCustom(x2, y2, ['Bone', 'ones'], [10461606, 13751258],2) then //as JJ said, an if...then boolean statement and double space from the beginning of the begin
begin
wait(10+random(100)); //try to keep your double spacing consistent
ClickMouse2(false);
wait(500+random(500));
ChooseOption('ones');
FFlag(2); //This was WAY out here. Try to keep from doing that
end;
atkprocedure; //when calling this outside of the current begin...end; statement, you line it up with the end; before it.
end;
while srl_inFight do Antiban;//decent antiban ////Don't capitalize the syntax'd words. (The ones that turn bold)
end;

Fixed it up for you. Try to keep your standards up.