Sk1nyNerd
2014-01-30 00:47:10
i keep getting this error on the line of my HueMods and i dont understand why? am i missing something?
Exception in Script: Expression expected at line 142, column 15function FindTree: Boolean;
var
TPA, TempTPA: TPointArray;
ATPA: Array of TPointArray;
i, x, y, MinPoints, CTS: Integer;
Colors, Tolerances: TIntegerArray;
HueMods, SatMods: TExtendedArray;
begin
Result:= False;
if (TimeFromMark(FindTreeTime) > 60000) then
begin
writeln('Unable to find any trees...');
LogOut;
TerminateScript;
end;
Colors := [5014947, 4359279];
Tolerances := [15, 20];
HueMods := [.02, .02];
SatMods := [.57, .31];
MinPoints := 15;
CTS:= GetToleranceSpeed;
ColorToleranceSpeed(2);
for i:= 0 to High(Colors) do
begin
SetToleranceSpeed2Modifiers(Huemods[i], SatMods[i]);
FindColorsTolerance(TempTPA, Colors[i], MSX1, MSY1, MSX2, MSY2, Tolerances[i]);
AppendTPA(TPA, TempTPA);
end;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (High(TPA)> 0) then
begin
ATPA:= SplitTPA(TPA,10);
SortATPASize(ATPA,True);
for i:= 0 to High(ATPA) do
begin
if (High(ATPA[i]) < MinPoints) then
Break;
end;
if (i = 0) then
Exit;
SetArrayLength(ATPA,i);
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY));
for i:= Low(ATPA) to Min(High(ATPA),3) do
begin
MiddleTPAEX(ATPA[i],x,y);
MMouse(randomrange(x-5,x+5),randomrange(y-5,y+5),0,0);
if WaitUpTextMulti(['hop','own'],randomrange(150,600)) then
begin
if (IsUpTextMultiCustom(['hop','own'])) then
begin
HumanWait;
HumanClick;
if (DidRedClick) then
Result:= True;
Exit;
end;
end;
end;
end;
end;