Results 1 to 7 of 7

Thread: runtime error

  1. #1
    Join Date
    Jan 2008
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default runtime error

    Out Of Range in line 46 in script is the error i get

    that line is
    Players[1].Name :='';
    but i have it set for only one player so that would be player[0]
    i think i have everything correct...
    any1 see a prob? P.S. i took out my name and pass, and i only want to use player [0]




    SCAR Code:
    const
      SRLStatsID = '4100';  // SRL Stats ID Number
      SRLStatsPW = ;  // SRL Stats Password
      GasTol = 15;  // Change if find you broken pickaxes!
      MinGasChange = 200; // 100+ About 200-300 and more. Basically tolerance.
      UseResponder = True; // Use autoresponder?
      RunDir = 'S'; // direction to run if in fight
                    // N for north, S for south, etc.
                   
    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 1;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='pic'; //3-4 letters from name
      Players[0].Active:= True;
      Players[0].Booleans[1]:= True; // True if new rocks. False if old.
      Players[0].Booleans[2]:= True; // Pick equipped?
      Players[0].Strings[1]:= 'Coal'; // type of ore
      Players[0].Integers[1]:= 200; // # of loads

      Players[1].Name :='';
      Players[1].Pass :='';
      Players[1].Nick :=''; //3-4 letters from name
      Players[1].Active:= True;
      Players[1].Booleans[1]:= True; // True if new rocks. False if old.
      Players[1].Booleans[2]:= False; // Pick equipped?
      Players[1].Strings[1]:= 'Tin'; // type of ore
      Players[1].Integers[1]:= 5; // # of loads

  2. #2
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Set HowManyPlayers back to two, CurrentPlayer to 0, and Players[1].Active to False (disabling it the easy way).
    Interested in C# and Electrical Engineering? This might interest you.

  3. #3
    Join Date
    Jan 2008
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [Runtime Error] : Out Of Range in line 55 in script
    is the error after i did that

    what do i do now?

    SCAR Code:
    const
      SRLStatsID = '4100';  // SRL Stats ID Number
      SRLStatsPW = '';  // SRL Stats Password
      GasTol = 15;  // Change if find you broken pickaxes!
      MinGasChange = 200; // 100+ About 200-300 and more. Basically tolerance.
      UseResponder = True; // Use autoresponder?
      RunDir = 'S'; // direction to run if in fight
                    // N for north, S for south, etc.
                   
    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 2;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='pic'; //3-4 letters from name
      Players[0].Active:= True;
      Players[0].Booleans[1]:= True; // True if new rocks. False if old.
      Players[0].Booleans[2]:= True; // Pick equipped?
      Players[0].Strings[1]:= 'Coal'; // type of ore
      Players[0].Integers[1]:= 200; // # of loads

      Players[1].Name :='';
      Players[1].Pass :='';
      Players[1].Nick :=''; //3-4 letters from name
      Players[1].Active:= False;
      Players[1].Booleans[1]:= True; // True if new rocks. False if old.
      Players[1].Booleans[2]:= False; // Pick equipped?
      Players[1].Strings[1]:= 'Tin'; // type of ore
      Players[1].Integers[1]:= 5; // # of loads

      Players[2].Name :='';
      Players[2].Pass :='';
      Players[2].Nick :=''; //3-4 letters from name
      Players[2].Active:= False;
      Players[2].Booleans[1]:= True; // True if new rocks. False if old.
      Players[2].Booleans[2]:= False; // Pick equipped?
      Players[2].Strings[1]:= 'Tin'; // type of ore
      Players[2].Integers[1]:= 5; // # of loads

      Players[3].Name :='';
      Players[3].Pass :='';
      Players[3].Nick :=''; //3-4 letters from name
      Players[3].Active:= False;
      Players[3].Booleans[1]:= True; // True if new rocks. False if old.
      Players[3].Booleans[2]:= False; // Pick equipped?
      Players[3].Strings[1]:= 'Tin'; // type of ore
      Players[3].Integers[1]:= 5; // # of loads}

    End;

  4. #4
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Oh, didn't know there were more. Set HowManyPlayers to four.

    You should read some beginner SCAR tutorials. It will help you solve errors like this without having to resort to others' help.
    Interested in C# and Electrical Engineering? This might interest you.

  5. #5
    Join Date
    Jan 2008
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i read like 4 tutorials and it did help me on a few subjects

  6. #6
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    1st of all SMARTZKID you should have told him this is wrong section....

    if this is your own Script go ahead post this at scripting help please

    and if its not

    please post it at the Owners thread and im sure they should respond

    thankz just trying to help this forum

  7. #7
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Moved to help
    STOP PM'ING ME

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Runtime Error] : Exception: buffer error
    By GasMan in forum OSR Help
    Replies: 11
    Last Post: 05-13-2007, 02:07 PM
  2. Runtime Error
    By CamHart in forum OSR Help
    Replies: 2
    Last Post: 11-23-2006, 05:21 AM
  3. Runtime error
    By sk8ter in forum OSR Help
    Replies: 3
    Last Post: 10-30-2006, 01:55 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
  •