PHP Code:
[Runtime Error] : Exception: Canvas does not allow drawing in line 74 in script \SCAR\includes\SRL\SRL\Core\AntiRandoms\Common.scar
PHP Code:
{*******************************************************************************
function SRL_GetBlackBackground: Integer;
by: ZephyrsFury
Description: Autocolours the black background colour. Returns -1 if not found.
*******************************************************************************}
function SRL_GetBlackBackground: Integer;
var
CTS, I, H, C, Count, MaxC: Integer;
TPA: TPointArray;
Cols: TIntegerArray;
begin
Result := -1;
if (not(LoggedIn)) then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(100, 100);
FindColorsTolerance(TPA, clBlack, MMX1, MMY1, MMX2, MMY2, 2);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then Exit;
Cols := GetColors(TPA);
ClearSameIntegers(Cols);
H := High(Cols);
for I := 0 to H do
begin
C := Cols[I];
Count := CountColor(C, MMX1, MMY1, MMX2, MMY2);
if (CountColor(C, MMX1, MMY1, MMX2, MMY2) > MaxC) then
begin
Result := C;
MaxC := Count;
end;
end;
end;
Line 74: Cols := GetColors(TPA);
What's the issue here? All its doing is a findobject, but this happens.
Its in SMART if that makes a difference.
I'm working on releasing a vial filler, so if you want it help me out
.
edit: it may have just been an issue with the selected client and SMART... I don't really know how smart works though.