Results 1 to 9 of 9

Thread: Need help.. about invalid number of parameters

  1. #1
    Join Date
    May 2007
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Need help.. about invalid number of parameters

    I was wondering if someone could help me with this small procedure because I've read almost every tut and I've looked through the procedure like a thousand times but I can't figure out what's wrong.. Can someone help?

    SCAR Code:
    Procedure Chop;

    var
      loops:integer;
      i:integer;

    Begin
      Loops := 0
        repeat
         Loops:=Loops+1;
         If(FindObj3(x, y,'ew', YewColor,3)) then
           begin
             MMouse(x, y, 1, 1);
             Wait(1000+random(500));
             if(IsUpText('hop')) or (IsUpText('cho')) or (IsUpText('hop'))then
               begin
                 Mouse(x, y, 1, 1, true)
                 FindTheEnt;
                 FindTheHead;
                 AttachTheHead;
                 AutoTalk;
                 FindNormalRandomsChoice;
                 OtherAntiBan;
                 Wait(1000 + random(500));
                 i=i+1
                 until (InChat('logs.')) or (InChat('get some'));
            if(not(FindObj3(x, y,'ew', YewColor,3)))then
            begin
              Tries:=Tries + 1
            if(Tries = 15)then
            begin
              Writeln('Sorry,the script could not work')
              Writeln('Please try restarting the script')
              Writeln('If problem persists, please notify me')
              Players[CurrentPlayer].Active := False;
              LogOut;
              Exit;
              NextPlayer(False)
          end;
        end;
      end;
    end;

  2. #2
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think you forgot some semicolons. Also, I don't think it's wise to have an if statement extend outside the loop.

    SCAR Code:
    Procedure Chop;

    var
      loops:integer;
      i:integer;

    Begin
      Loops := 0
        repeat
         Loops:=Loops+1;
         If(FindObj3(x, y,'ew', YewColor,3)) then
           begin
             MMouse(x, y, 1, 1);
             Wait(1000+random(500));
             if(IsUpText('hop')) or (IsUpText('cho')) or (IsUpText('hop'))then
               begin
                 Mouse(x, y, 1, 1, true);
                 FindTheEnt;
                 FindTheHead;
                 AttachTheHead;
                 AutoTalk;
                 FindNormalRandomsChoice;
                 OtherAntiBan;
                 Wait(1000 + random(500));
                 i=i+1
               end;
                 until (InChat('logs.')) or (InChat('get some'));
            if(not(FindObj3(x, y,'ew', YewColor,3)))then
            begin
              Tries:=Tries + 1;
            if(Tries = 15)then
            begin
              Writeln('Sorry,the script could not work');
              Writeln('Please try restarting the script');
              Writeln('If problem persists, please notify me');
              Players[CurrentPlayer].Active := False;
              LogOut;
              Exit;
              NextPlayer(False)
        end;
      end;
    end;

    EDIT: But it still doesn't make sense. It won't check the tries, as it's not in the loop.
    I guess the holidays are over - no sig for now.

  3. #3
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    SCAR Code:
    begin
              Writeln('Sorry,the script could not work');
              Writeln('Please try restarting the script');
              Writeln('If problem persists, please notify me');
              Players[CurrentPlayer].Active := False;
              LogOut;
              Exit;
              NextPlayer(False)
        end;

    remove the whole part before exit because nextplayer(false) takes care of that all completely.

  4. #4
    Join Date
    May 2007
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    It says the Line 341: [Error] (15391:11): Invalid number of parameters in script... which is on the line FindTheEnt

  5. #5
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you include the Ent procedure in the whole of your script?

    And to jhildy: Sorry, I didn't know. I haven't written a line of SCAR my whole life.
    I guess the holidays are over - no sig for now.

  6. #6
    Join Date
    Apr 2007
    Location
    Shhhhhhh im right behind you
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol u havent ever written a line of scar in your life!? I didnt know that!

    not dising u at all im just surprised

  7. #7
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Check to make sure that you have semi colons, begins, ends and := where needed. Also, I'm pretty sure that FindNormalRandomsChoice needs you to choose which randoms you want... ie. FindNormalRandomsChoice(something in here). That's probably the reason for the invalid number of parameters error.

  8. #8
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Check to make sure that you have semi colons, begins, ends and := where needed. Also, I'm pretty sure that FindNormalRandomsChoice needs you to choose which randoms you want... ie. FindNormalRandomsChoice(something in here). That's probably the reason for the invalid number of parameters error.
    No, he gets the error before that. I'm sure he just didn't include the include with the Ent procedure.
    I guess the holidays are over - no sig for now.

  9. #9
    Join Date
    May 2007
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Well since everyone thinks its in somewhere else.. I'm going to make a new thread and post the whole script

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Invalid Number Of Parameters
    By decide in forum OSR Help
    Replies: 3
    Last Post: 07-28-2008, 06:11 AM
  2. Invalid number of parameters
    By kristahlyn in forum OSR Help
    Replies: 2
    Last Post: 06-16-2007, 02:39 PM
  3. Invalid Number of Parameters
    By richyyrich09 in forum OSR Help
    Replies: 6
    Last Post: 06-12-2007, 10:48 PM
  4. invalid number of parameters
    By stuckman in forum OSR Help
    Replies: 4
    Last Post: 05-27-2007, 01:32 PM
  5. Invalid Number Of Parameters
    By Any-key in forum OSR Help
    Replies: 12
    Last Post: 04-21-2007, 12:11 AM

Posting Permissions

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