Results 1 to 2 of 2

Thread: Invalid parameters

  1. #1
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default Invalid parameters

    My script keeps on giving me this error about an invalid number of parameters, and I have tried quite a few things to fix it.
    Code:
    Failed when compiling
    Line 596: [Error] (15726:36): Invalid number of parameters in script
    Here is the part that has the problem:
    SCAR Code:
    if (HpPercent < 25) then
        begin
          Status('Running away. Low HP.');
          RunAwayDirection(x,y,CurrentRunDir);
          StatCD('Waiting for out of fight', 20, 30);
          Runback(x,y);
    I don't know what to do.

  2. #2
    Join Date
    Dec 2006
    Location
    Minnesota
    Posts
    227
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Change the line :

    RunAwayDirection(x,y,CurrentRunDir);

    using this outline

    procedure RunAway(dir: string; RunFar: Boolean; Action, WaitTime: Integer);
    By: nielsie95
    Description: Runs away in minimap related direction, based on north.
    Dir can be 'N', 'E', 'S' or 'W'. RunFar will run furder than normal.
    Action can be either 1, 2 or 3.
    1: RunAway + Wait(WaitTime) + RunBack
    2: RunAway + Wait(WaitTime)
    3: RunBack
    Note: WaitTime is in milliseconds!




    Example: RunAway('N', True, 1, 6000);

    So it's like the run direction, true/false to run far, then 1 to wait and come back, 2 to run away and just wait, or 3 to just run back. Then you put in the wait time.

    Get it?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Why do i keep getting invalid parameters for?
    By Scaper in forum OSR Help
    Replies: 1
    Last Post: 07-15-2008, 10:56 PM
  2. Replies: 3
    Last Post: 04-04-2008, 10:06 PM
  3. Invalid parameters help.
    By Hey321 in forum OSR Help
    Replies: 16
    Last Post: 11-13-2006, 02:29 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
  •