Getting an error when using TPA's
I am currently working on a powerminer for a RSPS, when it starts up it attempts to detect smoke(random event smoke that comes from rocks) and if it does not find any it moves on to click the iron rock, So far I got:
Simba Code:
program Powermine;
{$i srl/srl.simba}
Procedure AntiSmoke;
Begin
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.18,0.45);
Wait(5000);
end;
Procedure FindRock;
var
tmpCTS, l, r,X,Y:Integer;
IronTPA:TPointArray;
SmokeTPA:TPointArray;
begin
SmokeTPA := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.17, 0.17);
If FindColorsTolerance(SmokeTPA, 7110803, 11, 27, 522, 360, 4) then
begin
AntiSmoke;
end;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.18,0.45);
if FindColorsTolerance(IronTPA, 2569557, 11, 27, 522, 360, 3) then
begin
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(IronTPA)
wait(randomrange(60, 200));
mmouse(IronTPA[r].x, IronTPA[r].y, 2, 2);
clickmouse2(mouse_left);
end;
end;
begin
SetupSRL
FindRock;
end
But I get this error:
Code:
[Error] C:\Simba\Scripts\KMiner.simba(16:32): Type mismatch at line 15
Compiling failed.
I don't understand what's wrong.