SRL Archive - OSR Help

General/Random Help


YoHoJo

2013-02-24 05:13:16

function FindWhirlPool(var x, y: Integer): Boolean;
var
Points: TPointArray;
Rx, Ry: Integer;
begin
if X then
begin
if (Rx > 0) or (Ry > 0) then
begin
MMouse(Rx, Ry, 0, 0);
Wait(1000);
Result := True;
ColorToleranceSpeed(1);
Exit;
end;
end;
Result := False;
end;

Pseudo-code ^

If FindWhirlPool(253, 209) Then 
Begin
Writeln('WhuuurlPooool!');
End;]

Variable Expected at line 179

Why? Line is If FindWhirlPool(253, 209) Then

DannyRS

2013-02-24 05:16:30

Normally the line before it is messed up, and missing ; or such, could you post the real function? Do you need var before the integer's inside the function parameters?

Check the lines before you call the function, see if any are missing a variable,

Edit - change it to:


function FindWhirlPool(x, y: Integer): Boolean;

And it works fine ^^