1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Feedback [SOLVED] Data Structures and Grid X Output Errors

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Neptune, Aug 6, 2019.

  1. Neptune

    Neptune Member

    Joined:
    Jun 21, 2016
    Posts:
    1,042
    I'm not sure if this is the proper place to put this, and I apologize if it's not.

    Code:
    Grid 42, index out of bounds writing [0,3] - size is [0,0]
    This kind of error (depending on how many hours of prior coding was done before running) can be very hard to find. Sometimes you can just retrace your steps, other times not.

    I'm requesting/wondering if ANY other information about where the error occured (scripts/objects) or the name of the variable storing the data structure can be output for us to reference?

    My project currently has hundreds of various data structures, some that exist through its whole runtime, some that are constantly popping in and out of existence, and I'll quite often make a small mistake that leads to an error like this. These "Grid X" errors are undoubtedly the most time consuming debugging I deal with on a regular basis, and I can't imagine I'm the only one.

    Thankyou, and any information/feedback is appreciated :)
     
  2. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,443
  3. Neptune

    Neptune Member

    Joined:
    Jun 21, 2016
    Posts:
    1,042
    That is pretty clever! Unfortunately the find/replace i dont think will work for me because I use
    Code:
    grid[# 0,0] list[| 0] map[? ""] 
    formatting everywhere xD
     
  4. Nommiin

    Nommiin Member

    Joined:
    Oct 25, 2016
    Posts:
    2
    Hey Neptune, I made an extension that'll override the built-in functions with wrapper scripts that throw errors upon reading/writing out of bounds: https://nommiiin.itch.io/safegrids
     
  5. Neptune

    Neptune Member

    Joined:
    Jun 21, 2016
    Posts:
    1,042
    @Nommiin hey! that is awesome, I'd like to try it, but I get
    Code:
    'Error extracting package archive: Operation is not valid due to the current state of the object.'
    when accepting
    Code:
    "Import marketplace package assets instead of adding a datafile?"
    I can add it as an included file, but that's about as far as I got.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice