I am currently working on a project that requires a LOT of variable storage, and I am running into some errors that I think may be caused buy the many arrays that I need for the game.
When I run the game through the DSGM emulator (it compiles fine), one of 3 things can happen: It can work completely fine, it can say "The rom image has crashed", or it can say "Undefined opcode - with no debug vector defined".
The part of the code that causes the problem is in the "createFloorObject" object, and in the "Set floor layouts" section. What this part of the code is doing is reading room layouts from a text document and inputing the info into several arrays, roomDatObject, roomDatX, and roomDatX. There is a 7X7 grid of rooms, and each room contains 50 object type/x position/y position values.
By messing with the random numbers in my code, I found that loading room 3 repeatedly can cause a problem, but the code CAN load room 3, just doing it a lot causes an error. This is why I think it might be a memory issue.
My main question is what does the error message mean? I suspect it has something to do with memory management, but I really have no idea. Also, can you guys think of a better way to store all this data?
Thanks for reading all this,
- (36.39 KiB) Downloaded 105 times