Results 1 to 8 of 8

Thread: Unknown identifier 'NumberOfPlayers' at line 26

  1. #1
    Join Date
    Mar 2010
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Unknown identifier 'NumberOfPlayers' at line 26

    I get this while compiling my script

    Unknown identifier 'NumberOfPlayers' at line 26
    At the top I did

    {$i SRL\SRL.scar}
    so I really don't understand why it can't find it.
    Wow. I've been gone a very long time indeed. So much has changed.

  2. #2
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It would help if you let us know more, like if you're using SCAR/simba etc. the script too.

    If you're using SCAR change {$ to {.include

  3. #3
    Join Date
    Mar 2010
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the quick reply.

    Um... I'm using SIMBA. Starting a new script.

    This is what I have so far, if it helps:

    {*************
    INTERNAL VERSION
    CONTAINS ACCOUNT INFO
    DO NOT LEAK
    **************)

    program GraniteMiner;
    {$i SRL\SRL.scar}

    const
    NumbOfPlayers = 1;
    StartPlayer = 0;
    RockColor = 6458286;
    RockTol = 2;
    RockRadius = 5;
    MouseTol = 2;

    {************************************************* ******************************
    procedure DeclarePlayers;
    By: SRL
    Description: SRL's Player Setup
    ************************************************** *****************************}
    procedure DeclarePlayers;
    var i:integer;
    begin
    NumberOfPlayers(NumbOfPlayers);
    CurrentPlayer := StartPlayer;
    for i := 0 to NumbOfPlayers-1 do
    Players[i].BoxRewards := ['ithril', 'oal', 'une', 'oins'];
    with Players[0] do
    begin
    Name := '************'; //Player username.
    Pass := '************'; //Player password.
    Nick := '****'; //Player nickname - 3-4 letters of Player username.
    Active := True;
    end;
    end;

    {************************************************* ******************************
    procedure SetUpScript
    By: ForgotMyName
    Description: Initialize SRL, script data, etc
    ************************************************** *****************************}
    procedure SetUpScript;
    begin

    end;

    {************************************************* ******************************
    function FindRock: Boolean
    By: ForgotMyName
    Description: Find a granite rock and mouse over it
    Returns: True if rock found and mouse at rock, false if failed
    ************************************************** *****************************}
    function FindRock: Boolean;
    var RockPoints: TPointArray;
    RockSplits: T2DPointArray;
    I, H, X1, Y1: Integer;
    begin
    SetColorToleranceSpeed(1);
    if not (FindColorsSpiralTolerance(MSCX, MSCY, RockPts, RockColor, MSX1, MSY1, MSX2, MSY2, 3)) then
    begin
    WriteLn('Could not find rock color on mainscreen!');
    Result := False;
    Exit;
    end;
    RockSplits := TPAtoATPA(RockPoints, RockRadius);
    H := High(RockSplits);
    for I := 0 to H do
    begin
    MiddleTPAEx(RockSplits[I], X1, Y1);
    MMouse(X1, Y1, MouseTol, MouseTol);
    Wait(50 + Random(100));
    if IsUpText('ine') then
    begin
    Result := True;
    Exit;
    end;
    end;
    Result := False;
    end;

    {************************************************* ******************************
    procedure MainLoop;
    By: ForgotMyName
    Description: Main script loop
    ************************************************** *****************************}
    procedure MainLoop;
    begin

    end;

    begin
    SetUpSRL;
    DeclarePlayers;
    SetUpScript;
    MainLoop;
    end.
    Wow. I've been gone a very long time indeed. So much has changed.

  4. #4
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not sure how you did this lol, but your include is becoming part of your script header.

    Simba Code:
    {*************
    INTERNAL VERSION
    CONTAINS ACCOUNT INFO
    DO NOT LEAK
    **************)

    program GraniteMiner;
    {$i SRL\SRL.scar}

    won't work vs.

    Simba Code:
    program GraniteMiner;

    {$i SRL\SRL.scar}

  5. #5
    Join Date
    Mar 2010
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow, thank you! That was a very strange error. I'll remember to put my comments elsewhere.

    EDIT: Oops. That was a round brace instead of a curly one. I feel stupid now.
    Last edited by ForgotMyName; 10-04-2010 at 04:07 AM.
    Wow. I've been gone a very long time indeed. So much has changed.

  6. #6
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I see why, you closed with a ) rather than a }

    Simba Code:
    {*************
    INTERNAL VERSION
    CONTAINS ACCOUNT INFO
    DO NOT LEAK
    **************)

    program GraniteMiner;
    {$i SRL\SRL.scar}

    See the Closing parenthisis it needs to be a }

    Current Script Project
    Pot of flour gatherer - 95% done

    Can't get Simba to work? Click here for a tutorial

  7. #7
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Four hourse and 15 minutes too late, Bad Boy.

  8. #8
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    (*
    *)

    Are valid multi-line comments in PASCAL...

    EDIT: Never-mind, saw he use { first..
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

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
  •