Results 1 to 5 of 5

Thread: Logging in problem :S

  1. #1
    Join Date
    Nov 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Logging in problem :S

    Hi,
    I have just started making a new script I know its not much but so far this is what i have.

    Code:
    program Gnome_Agility_Course_Runner;
    {.include SRL\SRL.Scar}
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;
      CurrentPlayer :=0;
      
      Players[0].Name := 'username';  //Username
      Players[0].Pass := 'password';  //Password
      Players[0].Nick := 'nick';      //3-4 letters from your username
      Players[0].Active := True;
    end;
    
    procedure Report;
    begin
      ClearDebug;
      WriteLn('Thank you for using DaNkaTa''s Gnome_Agility_Course_Runner');
      WriteLn('The script has been running for '+TimeRunning);
    end;
    
    begin
      DeclarePlayers;
      LoginPlayer;
      Report;
    end.
    I can't see anything wrong with this, but I get this error, '[Runtime Error] : Out Of Range in line 9 in script C:\Program Files\SCAR 3.20\Scripts\Gnome_Agility_Course_Runner.scar'
    Could anyone tell me what wrong please?

    Thanks,
    DaNkaTa`

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Add in this line:

    SCAR Code:
    NumberOfPlayers(HowManyPlayers);

    Should look like this:

    SCAR Code:
    program Gnome_Agility_Course_Runner;
    {.include SRL\SRL.Scar}

    procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;
      NumberOfPlayers(HowManyPlayers);//This line
      CurrentPlayer :=0;

      Players[0].Name := 'username';  //Username
      Players[0].Pass := 'password';  //Password
      Players[0].Nick := 'nick';      //3-4 letters from your username
      Players[0].Active := True;
    end;

    procedure Report;
    begin
      ClearDebug;
      WriteLn('Thank you for using DaNkaTa''s Gnome_Agility_Course_Runner');
      WriteLn('The script has been running for '+TimeRunning);
    end;

    begin
      DeclarePlayers;
      LoginPlayer;
      Report;
    end.

    That should clear up your problem.

  3. #3
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You forgot to add SetupSRL; in the mainloop.

  4. #4
    Join Date
    Nov 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Coh3n thanks helped me alot there :P.
    Dark Arcana I know i realised after i posted .

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by DaNkaTa` View Post
    Coh3n thanks helped me alot there :P.
    No problem, glad I could help.

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
  •