Log in

View Full Version : Compile Fail



gaetano
12-21-2011, 08:31 PM
program SecretForNow;

{$DEFINE SMART}
{$i SRL\SRL.scar}

procedure SetupChar;

begin

SetAngle(True);
MakeCompass('N');
Retaliate(True);
end;


Function WalkToPad(Which: String): boolean;

Begin

Result := False;
If Not LoggedIn then Exit;
if (HPPercent < 50) then
Begin
MoveMouse(651, 37);
Mouse(651, 37, 1, 1, True);

End;
End;



Begin

SetupSRL;
Repeat
WalkToPad;
Until (false)
End.
[Error] (37:14): Invalid number of parameters at line 36
Compiling failed.

Which is the 2nd last line.

Simple script that I will be releasing once done :)

Thanks.

RISK
12-21-2011, 08:32 PM
It's because you aren't using the "Which" parameter on that function. Just change it to a procedure like this:
procedure WalkToPad;

gaetano
12-21-2011, 09:00 PM
Thank you :)

Compiled correctly.