Results 1 to 5 of 5

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

  1. #1
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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

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


    Simba Code:
    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

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    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:

    Simba Code:
    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 am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the help

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

    Thanks!

    Sorry for being so new to this, but running this script won't open SMART
    Last edited by i need to bot!; 01-07-2012 at 09:06 PM.

  4. #4
    Join Date
    Nov 2011
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have to put {$DEFINE SMART}

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

  5. #5
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •