It works if I type it like this
Simba Code:TheThing := FindTPointCluster([1721945,1258561,1026,1580059,531240], 10, Point(647, 147), -1, -1, 10, MMX1, MMY1, MMX2, MMY2);
ATPA := TPAtoATPAEx(TheThing, 3,3);
writeln('Walking to log');
for i := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[i]); //I would only want i=0
SMART_DrawCircle(true, MP, 15, false, clRed);
Mouse(MP.x, MP.y, 5, 5, mouse_Left);
repeat
wait(10);
until InsideArea(0, ['9_2','9_1'], 3843, 839, 3847, 847);
Break;
end;
But since I only want the first result, why can't I do this? It returns an error:Out of range
Simba Code:TheThing := FindTPointCluster([1721945,1258561,1026,1580059,531240], 10, Point(MMCX, MMCY), -1, -1, 10, MMX1, MMY1, MMX2, MMY2);
ATPA := TPAtoATPAEx(TheThing, 3,3);
writeln('Loging');
MP := MiddleTPA(ATPA[0]); //Error here
SMART_DrawCircle(true, MP, 15, false, clRed);
ThePoint := MMtoMS(MP);
Mouse(ThePoint.x+30, ThePoint.y+10, 3, 3, mouse_Right);
if WaitOption('ross', 2000) then
begin
repeat
wait(10);
until MyPos(Point(3815, 847));
Result := True;
end;


Reply With Quote





