Results 1 to 7 of 7

Thread: Out of range

  1. #1
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default Out of range

    im making a script to smelt, but i get out of range errors.

    SCAR Code:
    GetBarInfo(Players[0].Strings[1]);

    I get the error here... What is wrong with this?

  2. #2
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Do you have:
    SCAR Code:
    NumberOfPlayers(1);
    somewhere in your script?

  3. #3
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    yes, i got "NumberOfPlayers(HowManyPlayers);" and howmanyplayers are 1

    EDIT: Going to pee.. back in like... 5 mins

    EDIT2: Back now

  4. #4
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Do you ever specify the array size for Strings[]?

    I do it like this...

    for i:= 0 to HowManyPlayers-1 do
    begin
    SetArrayLength(Players[i].Integers,5);
    end;

    The begin and end aren't necessary, and you would use Strings instead of Integers, but you should try adding that if you don't have it.


  5. #5
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    That is already in the NumberOfPlayers procedure

    SCAR Code:
    {*******************************************************************************
    procedure NumberOfPlayers(Number: Integer);
    By: BenLand100 / Wizzup?
    Description: Makes the Players array have Number indexes, also sets strings and
    other player array's too standard 100.
    *******************************************************************************}


    procedure NumberOfPlayers(Number: Integer);
    var
       I: Integer;
    begin
      SetLength(Players, Number);
      HowManyPlayers := Number;
      for I := 0 to Length(Players) - 1 do
      begin
        SetLength(Players[i].Strings, 100);
        SetLength(Players[i].Integers, 100);
        SetLength(Players[i].Booleans, 100);
        SetLength(Players[i].Extendeds, 100);
      end;
    end;

    Ummm.. Idk..
    Do you use "NumberOfPlayers(HowManyPlayers);" BEFORE you use "GetBarInfo(Players[0].Strings[1]);"
    ??

  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Ah lol!

    I forgot to put DeclarePlayers; Somewhere! whahaha!
    Ty guys

  7. #7
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    ^Read^

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. 71-99 range?
    By isjusme in forum RuneScape News and General
    Replies: 16
    Last Post: 06-02-2008, 03:45 PM
  2. 70 range
    By isjusme in forum RuneScape News and General
    Replies: 6
    Last Post: 04-27-2008, 05:37 PM
  3. out of range
    By nik999389 in forum OSR Help
    Replies: 4
    Last Post: 10-29-2007, 09:43 AM
  4. Out of range
    By rotflmfwao in forum OSR Help
    Replies: 3
    Last Post: 08-22-2007, 02:29 AM
  5. Eh... Out of Range...
    By Pancakes in forum OSR Help
    Replies: 4
    Last Post: 07-03-2007, 11:41 AM

Posting Permissions

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