Results 1 to 8 of 8

Thread: RunTime Error?

  1. #1
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default RunTime Error?

    Ok what does this mean?
    SCAR Code:
    [Runtime Error] : Out Of Range in line 88 in script

    It Compiles fine and then when i press run i get that.

    SCAR Code:
    [line 88]AxeType[0] := DTMFromString('78DA637462666058C4C8800C7CAC9519FE036' +
           '990E87F20607403AA5980AA06220B2381B41D50CD7C22D42C21A0' +
           'C615A866397E3500294F0A3D');
    Any Ideas?

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Do you have AxeType declared as a TIntegerArray?

    Also make sure your not accidentally using a DTM where you should be a Bitmap.

    and if you post the whole script I can help more.

  3. #3
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function CheckForDeAxe(Gear: boolean): boolean;
    var
      AxeType: TIntegerArray;
    begin
      AxeType[0] := DTMFromString('78DA637462666058C4C8800C7CAC9519FE036' +
           '990E87F20607403AA5980AA06220B2381B41D50CD7C22D42C21A0' +
           'C615A866397E3500294F0A3D');
      AxeType[1] := DTMFromString('78DA633CCAC4C0709B010584F8F931FC07D28' +
           'C40FC1F08184F02D5DC6040038C4824903E04547397083584CC39' +
           '0154F310BF1A00D60F0E27');
      AxeType[2] := DTMFromString('78DA63F4606260F8CF8002AA8B8BC0428C40F' +
           'C1F0818BD816AFE30A001462412487B01D5B032E257E34284394E' +
           '40358CF8CD0100DA6E0AD6');
      AxeType[3] := DTMFromString('78DA632C606260B8CD8002ECEC6318FE03694' +
           '620FE0F048C7940353718D000231209A4CB806A6E1250530C54F3' +
           '90801A905D77F1AB010017A60C6C');
      AxeType[4] := DTMFromString('78DA639CC3C4C0709B010538873833FC07D28' +
           'C40FC1F08186700D5DC6040038C4824905E00547393809AB94035' +
           '0F09A8990E547317BF1A00716C0D40');
      AxeType[5] := DTMFromString('78DA632C646260F8CF80025CA353C1428C40F' +
           'C1F0818F3806AFE30A001462412489701D5FC25A0A604A8869511' +
           'BF9A5CA01A46FC6A001A9B0B4F');
      if(Gear)then CustomGameTab('gear');
      for i := 0 to 5 do
      begin
        result := (FindDTM(AxeType[i], x, y, MIx1, MIy1, MIx2, MIy2));
        if(result)then
        begin
          D('We have found your axe!');
          Break;
        end;
      end;
      for i := 0 to 5 do
      begin
        FreeDTM(AxeType[i]);
      end;
    end;
    SCAR Code:
    [Runtime Error] : Out Of Range in line 88 in script

    Same problem... Anything else?

  4. #4
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Add this line first:
    SCAR Code:
    SetLength(AxeType, 6);

  5. #5
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    Add this line first:
    SCAR Code:
    SetLength(AxeType, 6);
    Thanks a lot bro, and for the record what is a "TintegerArray"? thanks and rep+

  6. #6
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    an array of Integer;
    it's the same as doing

    axe: array of Integer;
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  7. #7
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Just another way to set length (adding to senraths post).
    SCAR Code:
    AxeType : array [0..5] of Integer;

  8. #8
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh ok thanks a bunch guys!

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
  •