i am currently trying to fix a tut runner so i can just set all my guys through it... i get this error
[Runtime Error] : Exception: Canvas does not allow drawing in line 1850
SCAR Code:
function ClickRat: Boolean;
var RatPoints: TPointArray; i, ci: integer;
begin
if(not(LoggedIn))then Exit;
Status('Searching Rat');
FindColorsSpiralTolerance(MSCx, MSCY, RatPoints, 9213847, 90, 65, 420, 250, 5)
for i := 0 to (GetArrayLength(RatPoints)-1) do
begin
if (Distance(RatPoints[ci].x, 0, RatPoints[i].x, 0) >= 10) and
(Distance(0, RatPoints[ci].y, 0, RatPoints[i].y) >= 10) then
ci := i
else
begin
RatPoints[i].x := 0;
RatPoints[i].y := 0;
end;
end;
for i := 0 to (GetArrayLength(RatPoints)-1) do
begin
if (RatPoints[i].x <> 0) then
{line with error} if FindColorTolerance(x, y, 7041908, RatPoints[i].x -8, RatPoints[i].y -8, RatPoints[i].x +8, RatPoints[i].x +8, 10) then // <<<<<<<<line with error
if FindColorTolerance(x, y, 8753039, RatPoints[i].x -8, RatPoints[i].y -8, RatPoints[i].x +8, RatPoints[i].x +8, 10) then
begin
if not IsFightAt(RatPoints[i].x, RatPoints[i].y) then
begin
MMouse(RatPoints[i].x, RatPoints[i].y, 0, 0);
Wait(100+Random(50));
if IsUpText('ack') then
begin
Mouse(RatPoints[i].x, RatPoints[i].y, 0, 0, True);
Result := True;
Exit;
end;
end;
end;
end;
end;
this would be a great help and i will post fixed tut runner when i am done fixing...