i keep getting out of range in Side[i]:=CountColorD(6710894,MSX1,MSY1,MSX2,MSY2,10)
SCAR Code:
Function FindWhichStone:string;
var i,S,B:integer;
Side:array of integer;
Begin
i:=1
Marktime(Mark);
Repeat
repeat
Setarraylength(Side,i);
wait(100)
Side[i]:=CountColorD(6710894,MSX1,MSY1,MSX2,MSY2,10)
B:=CountColorD(4473928,MSX1,MSY1,MSX2,MSY2,28)
Writeln('Background '+inttostr(B))
until Side[i] > 1000
Writeln(inttostr(side[i]))
i:=i+1
until timeFromMark(Mark) > 20000;
S:=AMax(Side)
Writeln('final amount of pixels = '+inttostr(S))
if FindBitMapTol(x,y,close,MSX1,MSY1,MSX2,MSY2) then
MMouse(x,y,2,2)
if isuptext('lose') then
getmousePos(x,y)
Mouse(x,y,0,0,true)
Result:=stone
end;
it worked before now i did something but i forgot what i did and now id doesnt work