SRL Archive - OSR Help

i cant seem to get my Function to compile


Saint//+

2013-02-28 17:41:17

its working now

so this is something i made to act like FindObjCustom but to search within a box


Procedure FindInBox(sX, sY, Xr, Yr, Color, Tol:Integer; Sbox:Tbox; uptext1, uptext2:String);

Var
i, x, y: Integer;
TPA: TPointArray;
Poin: Tpoint;
Begin
FindColorsSpiralTolerance(sX, sY, TPA, Color, Sbox.x1, sbox.y1, sbox.x2, sbox.y2, Tol);
if Length(TPA) = 0 then FindColorsSpiralTolerance(sX, sY, TPA, Color, Sbox.x1, sbox.y1, sbox.x2, sbox.y2, Tol);
for i := 0 to High(TPA)do
begin
Poin := TPA[i]
HumanMMouse(Poin.x, Poin.y, Xr, Yr);
IF (IsUpTextMultiCustom([uptext1, uptext2])) Then
Begin
GetMousePos(x, y);
Exit;
End;
Wait(350 + Random(350));
End;
End;

but for some reason when i try to compile my script it says i have an invalid number of paramaters Error. I can't figure out why.
the code for the function seems to compile, it just doesn't want to compile when i call it.

FindinBox(x, y, 2, 2, 794138, 6, Searchbox, ['ver', 'Gree']); //when i call this i get the error??????

any help would be extremely appreciated!

edit: was originally a function changed to a procedure to see if that would fix it with no profit. changed code to reflect changes i made so far


its working now