Log in

View Full Version : [Error] (31:9): Invalid number of parameters



i need to bot!
01-07-2012, 08:05 PM
Hey people, I am really enjoying Simba, and have already created a simple script which chops logs, and banks them, however...

After every single script I do, I get this? I even get it when i try to load MSI scripts..


'[Error] (31:9): Invalid number of parameters'

What has gone wrong so far, in this..


program ClaySoftener;

{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i sps/sps.simba}


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := 'XXXXXXX';
Pass := 'XXXXXXX';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Farming';
Active := True;
end;
end;



Procedure Startup;
Begin;
SetupSRL;
ActivateClient;
OpenBank;
WithdrawClay;



Function OpenBank;
begin
OpenBankQuiet('db');
end


Funtion WithdrawClay;
begin
procedureWithtdraw(6644065, 1, all:integer);
end


Error: [Error] (31:9): Invalid number of parameters at line 30
Compiling failed.

Can anyone please help :-) I have been loooving Simba

Brandon
01-07-2012, 08:12 PM
You really really need to reach the tutorial section.. Standards are off, missing semi-colons.. Functions have no return values.. Procedures Not used.. Procedure/Functions are not in order.. Wrong parameters for withdraw.. No begin/end. <-- with the dot.. etc. Other than that, I think you came off to a good start tbh. Just a little more learning and you'll be on your way. Please compare the script below to yours.

Check it out below:


program ClaySoftener;

{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i sps/sps.simba}


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := 'XXXXXXX';
Pass := 'XXXXXXX';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Farming';
Active := True;
end;
end;


Procedure OpenBankX;
begin
OpenBankQuiet('db');
end;

Procedure WithdrawClay;
begin
Withdraw(6644065, 1, 5000);
end;

Procedure Startup;
Begin;
SetupSRL;
ActivateClient;
OpenBankX;
WithdrawClay;
end;

begin
end.

i need to bot!
01-07-2012, 08:28 PM
Thanks for the help :)

I see the mistake now.. i got muddled up in an outdated guide :D

Thanks!

Sorry for being so new to this, but running this script won't open SMART

Fog856
02-08-2012, 02:19 PM
you have to put {$DEFINE SMART}

at line 2, or after you finish your program line, i think :o

laakerules
02-08-2012, 05:47 PM
And you have to initialize it in the script running begin/end. Part if I'm not mistaken.

You should have at least

Begin
Startup;
End.


At the bottom and then add in your othe functions and procedures in the order you want with all other statements needed.