SCAR Code:
function Hillgiantfight(Color:TintegerArray; tol: integer): integer; //My first function, so...
var
xxt,yyt,x,y,ftd:integer;
begin
if (not (LoggedIn) or (FindDead)) then Exit;
for ftd:=0 to high(color) do
x:=MMCX;
y:=MMCY;
if FindObjTPA(x, y,color[ftd], tol, -1, 15, 15, 50,['ill','ttack','iant'])and //Line with error
not FindColor(x, y, 65280, MIX1, MIY1, MIX2, MIY2) then
begin
Result:=1
Mouse(x,y,1,1,true);
end else
begin
if findcolortolerance(xxt,yyt,60909, MMX1, MMY1, MMX2, MMY2,tol) then
begin
xxt:=xxt+5;
yyt:=yyt+5;
if (not(findcolortolerance(xxt,yyt,5400423,MMX1, MMY1, MMX2, MMY2,tol))) then
begin
xxt:=xxt-5;
yyt:=yyt-5;
Mouse(xxt,yyt,5,5,true);
result:=2
end else
begin
result:=3
end;
end;
end;
end;
I get a
Out Of Range in line 277 in script
Line with error:
SCAR Code:
if FindObjTPA(x, y,color[ftd], tol, -1, 15, 15, 50,['ill','ttack','iant'])and
Oh, and its a runtime error. Whats wrong with it?