Results 1 to 3 of 3

Thread: Runtime Error message

  1. #1
    Join Date
    Dec 2006
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Runtime Error message

    Decided to create my first script in a modular way and have the following error with the attached script.

    I cannot work out what is wrong.

    Any Help much appreciated.

    Error:

    SRL Compiled in 430msec.
    [Runtime Error] : Out Of Range in line 117 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Login.scar

    Script:

    program MyFirstScript;
    {.include SRL/SRL.scar}
    {************************************************* ******************************
    procedure: DeclarePlayers By: Description:
    ************************************************** *****************************}
    Procedure DeclarePlayers;
    begin
    HowManyPlayers :=1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer:=0; // Player to start with
    Players[0].Name :='XXXXXX';
    Players[0].Pass :='XXXXXX';
    Players[0].Nick :='XXXX';
    Players[0].Active:=true;
    end;

    {************************************************* ******************************
    procedure: Setup Player By: Description:
    ************************************************** *****************************}
    procedure SetupPlayer;
    begin
    LoginPlayer;
    end;
    {************************************************* ******************************
    procedure: Main Program routine By: Twobac
    ************************************************** *****************************}
    begin
    SetupSRL;
    SetupPlayer;
    end.

    ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457

  2. #2
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You forgot to call the DeclarePlayers procedure in the script

    Try this:

    PHP Code:
    program MyFirstScript;
    {.include 
    SRL/SRL.scar}
    {************************************************* ******************************
    procedureDeclarePlayers ByDescription:
    ************************************************** *****************************}
    Procedure DeclarePlayers;
    begin
    HowManyPlayers 
    :=1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer:=0// Player to start with
    Players[0].Name :='XXXXXX';
    Players[0].Pass :='XXXXXX';
    Players[0].Nick :='XXXX';
    Players[0].Active:=true;
    end;

    {************************************************* ******************************
    procedureSetup Player ByDescription:
    ************************************************** *****************************}
    procedure SetupPlayer;
    begin
    LoginPlayer
    ;
    end;
    {************************************************* ******************************
    procedureMain Program routine ByTwobac
    ************************************************** *****************************}
    begin
    SetupSRL
    ;
    DeclarePlayers;
    SetupPlayer;
    end

  3. #3
    Join Date
    Dec 2006
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks. Works great now.

    Cheers

    ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Another Error Message =P
    By dr pigg11 in forum OSR Help
    Replies: 0
    Last Post: 11-02-2008, 01:15 PM
  2. help error message =(
    By phobotics in forum First Scripts
    Replies: 3
    Last Post: 05-14-2008, 09:23 PM
  3. Error message with SRL
    By firemaker272 in forum OSR Help
    Replies: 23
    Last Post: 01-11-2008, 07:25 PM
  4. error message?
    By XcanadamanX in forum OSR Help
    Replies: 5
    Last Post: 11-11-2006, 06:54 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
  •