this is my function
SCAR Code:
Function FindColorPriority(x:longint; y: longint; NumberOfColors: Integer; Tolerance: Integer; xs, ys, xe, ye: LongInt): Integer;
{.include SRL/SRL.scar}
var
Color: array of LongInteger;
x, y: Integer;
Counter: Integer;
const
Color[0]:=00000; {I want to add this into the Function thing, but i dont know how many there are going to be????????}
Color[1]:=00000;
Color[2]:=00000;
begin
Counter:=0
SetArrayLength(Color, NumberOfColors)
repeat
begin
if(FindColorTolerance(x, y, Color[Counter], xs, ys, xe, ye, Tolerance) then
Result:= Counter + 1;
Exit;
end else
Counter:=Counter +1;
end;
until(Counter=NumberOfColors);
begin
if(Counter=NumberOfColors) then
Result:=0
end;
end;
it gives me an error with the srl globals thing