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.
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.