Results 1 to 10 of 10

Thread: Still getting error... "Invalid number of parameters in script"

  1. #1
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Still getting error... "Invalid number of parameters in script"

    Line 96: [Error] (98:197): Invalid number of parameters in script C:\Users\Winter\Desktop\scarprerelease\includes\SR L\SRL\Misc\Smart.scar

    Please, someone just help me get rid of this...
    I've reinstalled, removed plugins, deleted everything and restored it all.

    I used Tortoise SVN to install...

    Running Vista 64-Bit.
    I've used scar on this computer before, and never had problems...
    I think it was SCAR Version 3.21 though...

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    When you post errors post the script with them. It wouldn't hurt to highlight the line the error is on either.

  3. #3
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here you go...

    Code:
    {$DEFINE SRL_SMART}
    
    function IsKeyDown(C:Char): Boolean;
    begin
      Result := SmartIsKeyDown(ord(c));
    end;
    
    procedure MoveMouse(x, y: Integer);
    begin
      SmartMoveMouse(x, y);
    end;
    
    procedure HoldMouse(x, y: Integer; left: Boolean);
    begin
      SmartHoldMouse(x, y, left);
    end;
    
    procedure ReleaseMouse(x, y: Integer; left: Boolean);
    begin
      SmartReleaseMouse(x, y, left);
    end;
    
    procedure KeyUp(key: Byte);
    begin
      If Key = 13 Then
        Key := 10;
      SmartReleaseKey(key);
    end;
    
    procedure KeyDown(key: Byte);
    begin
      If Key = 13 Then
        Key := 10;
      SmartHoldKey(key);
    end;
    
    procedure SendKeys(S: String);
    begin
      SmartSendKeys(S);
    end;
    
    procedure GetMousePos(var x, y: Integer);
    begin
      SmartGetMousePos(x, y);
    end;
    
    function GetColor(x, y: Integer): Integer;
    begin
      result:= SmartGetColor(x, y);
    end;
    
    procedure SmartSetTarget;
    var
      Smart_Bitmap: Integer;
    begin
      Smart_Bitmap:= BitmapFromString(765,503,'');
      GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
      SetTargetBitmap(Smart_Bitmap);
      FreeBitmap(Smart_Bitmap);
    end;
    
    function FindWindow(Title: String): Boolean;
    begin
      result:= true;
    end;
    
    procedure ActivateClient;
    begin
    end;
    
    function FindWindowBySize(Width, Height: Integer): Boolean;
    begin
      result:= true;
    end;
    
    {procedure SmartSaveSettings(v: TVariantArray);
    var
      i: Integer;
      ts: TStringArray;
    begin
      ts := ['server', 'members', 'signed', 'sd', 'DC', AppPath + '\Includes\SRL\SRL\Misc\SmartINI.INI'];
      for i := 0 to 4 do
        WriteINI('SMART', ts[i], v[i], ts[5]);
    end;   }
    
    procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
    var
      prefix: string;
    begin
      prefix := ReadINI('World' + IntToStr(Server), 'Prefix', AppPath + 'includes\SRL\SRL\misc\worlds.ini');
      if(prefix = '')then
      begin
        writeln('Invalid world number or corrupted world list. Please review your settings');
        TerminateScript;
      end;
      SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503);
      //SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
    end;
    
    {function SmartLastSettings: TStringArray;
    var
      i: Integer;
      ts: TStringArray;
    begin
      ts := ['server', 'members', 'signed', 'sd', 'DC', AppPath + '\Includes\SRL\SRL\Misc\SmartINI.INI'];
      SetLength(Result, 5);
      for i := 0 to 4 do
        Result[i] := ReadINI('SMART', ts[i], ts[5]);
    end; }
    
    Procedure SaveScreenshot(s : string);
    var
      TempBMP : integer;
      TempS : String;
    begin;
      Temps := s;
      While FileExists(Temps) do
      begin;
        Temps := ExtractFilePath(s) + Copy(ExtractFileName(Temps),1,LastPos('.',ExtractFileName(Temps))-1) + '2' + ExtractFileExt(s);
        Writeln(Temps);
      end;
      TempBMP := BitmapFromString(765,503,'');
      Try
        CopyClientToBitmap(TempBMP,0,0,765,503);
        SaveBitmap(TempBMP, Temps);
      Except
      end;
      FreeBitmap(TempBMP);
    end;

  4. #4
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Make sure you call
    SCAR Code:
    {.include srl/srl/misc/smart.scar}
    BEFORE
    SCAR Code:
    {.include srl/srl.scar}

  5. #5
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It is...
    I've not had this problem before, but I took scar off my computer a few months ago.
    Now I can't run a SMART script.

  6. #6
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    The line with the wrong amount of parameters is SmartSetup, you just need the newest Embedded_Smart.dll or whatever it's called. Just update your SRL to the latest SVN

  7. #7
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Walk me through that?

  8. #8
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    click the link in my signature?

    Next time try using the search button though, there are plenty of guides for getting your SVN updated. But just click here:

    http://www.villavu.com/forum/showthread.php?t=47993

  9. #9
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    DUDE I LOVE YOU.
    Thanks so much.

    I know, but i'm tired and kinda over this thing...
    I didn't know what you meant by that though because I've done something like that like 8 times.
    Thanks so much.

  10. #10
    Join Date
    Jun 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OH MY FCKING GOD!
    I'm tired of this!

    I just tried something and it worked.
    Now it's doing the same thing again.
    I deleted all of my scar stuff, reinstalled EVERYTHING.
    Then followed your procedure that worked the first time and now..
    It's just giving me the same error.
    Can someone please give me step-by-step on how to fix this?
    Because I have done every tutorial and searched every fix, and none of them have worked except the one that Baked just posted.

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
  •