It's a simple error, i know it! I can't figure it out though..
SCAR Code:
function LoadTree: boolean;
var
Color : TIntegerArray;
begin
Color := [1, 2, 3];
for i := 0 to High(Color) do
Writeln('Searching for tree color : '+ IntToStr(Color[i]));
if FindColorTolerance(x, y, Color[i], msx1, msy1, msx2, msy2, 10) then Result := True;
Writeln('Found : '+ BoolToStr(Result));
end;
I get this:
SCAR Code:
[Runtime Error] : Out Of Range in line 65 in script C:\Program Files (x86)\SCAR 3.20\Scripts\Box Trapper.scar
PS: Box trapper is a weird name for a woodcutter