Possible bug in GMS2

Jonno

Member
My project that I've imported from GMS 1.4 has been working fine up until now. I've got an error message that I'm assuming is a problem with GMS 2...

Code:
FATAL ERROR in
action number 1
of Create Event
for object oFrank:

Pop :: Execution Error - Variable Index [0,-1] out of range [1,5] - -5.<unknown variable>(100004,-1)
 at gml_Script___global_object_depths (line 48) -        global.__objectID2Depth[ objID ] = global.__objectDepths[i];
} // end for
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script___global_object_depths (line 48)
called from - gml_GlobalScript_1 (line 1) - __global_object_depths()
Is there any way to overcome this without having to start my project from scratch?
 

Nux

GameMaker Staff
GameMaker Dev.
It literally says the index is out of range/bounds of the array.
 
C

CedSharp

Guest
Do you know how to read error messages?
It says that you're accessing an array using the value '-1', which is out of range.
It's not a bug from GMS2, it's youre code which is at fault.

-- EDIT --
Damn, @Nux beat me to it xD
 

Nux

GameMaker Staff
GameMaker Dev.
Oh, I'm sorry! I thought that "global.__objectDepths" was an array you had created, and that you were handling it incorrectly.
Yeah it would seem as though you have the same issue.
Maybe follow along that thread and re-import your project.
 

Jonno

Member
No worries. Looking at the solution on that thread (if it worked) I doubt will be applicable to mine. @rwkay suggests editing the object_set_depth script, but I can't find that in my scripts folder.

Might just have to bite the bullet and re-import everything individually into a new GMS2 project to avoid future incompatibility issues.
 
Top