Results 1 to 6 of 6

Thread: Need help with a small error

  1. #1
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Need help with a small error

    This is the script part
    SCAR Code:
    // Fighting //
    procedure Fight;

    Var
       Dx,Dy: Integer;

    Begin
    If (FindObj(Dx, Dy, 'ttack', Mon1Color, MonTol, MinCount)) Then
      Begin
        MMouse(Dx,Dy,0,0);
        Mouse(Dx,Dy,0,0,true);
      end;
      Wait(4000+random(1000))
    FindFastRandoms;
    If (FindObj(Dx, Dy, 'ttack', Mon2Color, MonTol, MinCount)) Then
      Begin
        MMouse(Dx,Dy,0,0);
        Mouse(Dx,Dy,0,0,true);
      end;
     end;
    and this is the error:
    Line 146: [Error] (15602:58): Invalid number of parameters in script C:\Program Files\SCAR 3.06\Scripts\TFighter1.0.scar
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

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

    Default

    NumberOfPlayers( 1 );
    should be
    NumberOfPlayers=1;

    CurrentPlayer :=( 0 );
    no need for the () there

  3. #3
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    jhildy, I have no idea what you are talking about.
    And it must be NumberOfPlayers(1);, not NumberOfPlayers:=1;

    ButTimothegreat here's the fix:
    SCAR Code:
    procedure Fight;
    Var
       Dx,Dy: Integer;

    Begin
    If (FindObj(Dx, Dy, 'ttack', Mon1Color, MonTol)) Then
     Mouse(Dx,Dy,4,4,true)
    else
    If (FindObj(Dx, Dy, 'ttack', Mon2Color, MonTol)) Then
        Mouse(Dx,Dy,4,4,true)
    Flag;
    FindFastRandoms;
    end;

  4. #4
    Join Date
    May 2007
    Location
    in a pineapple under the sea
    Posts
    1,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thank you
    [SIZE="4"][CENTER][URL="http://www.youtube.com/watch?v=5YsGJz3j4os"]LOL u mad bro?[/URL][/CENTER][/SIZE]

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

    Default

    wow i think he edited his post cus it was something about player setup before

  6. #6
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Timothegreat View Post
    Thank you
    No problem.
    Quote Originally Posted by jhildy View Post
    wow i think he edited his post cus it was something about player setup before
    Oh ok he probably did, that explains it.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Small error, please help out
    By osmm in forum OSR Help
    Replies: 5
    Last Post: 10-12-2007, 01:50 AM
  2. Small error wont compile-please help
    By Adamb_135 in forum OSR Help
    Replies: 2
    Last Post: 04-18-2007, 01:48 PM

Posting Permissions

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