Can anyone tell me why this is giving me an out of range error?
SCAR Code:Function NearPlayer(TP: TPoint): boolean;
var
OPlayers: TPointArray;
i: integer;
begin
OPlayers := GetMiniMapDots('player');
if(Length(OPlayers) < 1)or(TP.x < 1)or(TP.y < 1)then
begin
Result := false;
Exit;
end;
SetLength(OPlayers, High(OPlayers) + 1);
For i := 0 to High(Players) do
begin
if(Distance(TP.x, TP.y, OPlayers[i].x, OPlayers[i].y) < 15)then
begin
Result := True;
Exit;
end;
end;
end;





Reply With Quote



