SRL Archive - General Botting Help

Invalid Number of Parameters at Line x


Hayden PKH

2014-02-03 19:45:12

Okay, there was another thread on this but the solutions posted there did not work for me. Sorry if there's an official thread somewhere on this, I'm new here.

I was following YoHoJo's guide on creating your first script, http://www.youtube.com/watch?v=qfumZWrm_DE

He explains how to make the function to chop down the tree, and I copied his code exactly, but when I compile it, I get an error saying " Invalid number of parameters at line 18."

On the other thread asking for help on this, someone told the guy to write in {$i SRL-OSR\SRL\misc\smart.simba}

I did this, and I got "Plugin(libsmart32) has not been found" (but I have SMART installed properly)

Here's what I've written/copied, thanks to anyone who helps.
*Note, I'm making this for a private server so I don't require to add in players or anything like that.

Program PowerChopper;

{$DEFINE SMART}
{$i SRL-OSR\SRL\misc\smart.simba}
{$i SRL-OSR\SRL.simba}


Const
BreakEvery = '120'; // How many minutes to break after
BreakFor = '5'; // How long to break for
Version = '1.0'; // Version #

Function ChopDown:Boolean;
Var
X, Y:Integer;
Begin
If FindObjCustom(X, Y,['Chop', 'down', 'p d'], [3761261, 3233118, 2177600], 20) then
Writeln;('Hooray, we found a tree');
End;
The last line is the line the error refers to.

The Mayor

2014-02-03 20:01:39

From: Hayden PKH
The last line is the line the error refers to.



Writeln;('Hooray, we found a tree');


Writeln('Hooray, we found a tree');

Sk1nyNerd

2014-02-03 20:11:46

From: Hayden PKH


On the other thread asking for help on this, someone told the guy to write in {$i SRL-OSR\SRL\misc\smart.simba}


im not sure why he told you you need that. what that line does is it looks for the Include "Smart.Simba" so you can use the functions in it. you can find this include and many others if you go to your c drive > simba > includes > SRL-OSR > SRL. these are where YoHoJo is getting some of the commands he uses in the tut. find a couple and try using them on your own when you feel comfortable

gl :)

Hayden PKH

2014-02-03 20:38:32

From: The Mayor

Writeln;('Hooray, we found a tree');


Writeln('Hooray, we found a tree');


oh my god i feel so foolish

Thank you, and thanks Sk1nyNerd for that info.