Game Development Community

Loading missions: crashing

by Ted (fatius) · in Torque Game Engine · 02/08/2006 (10:09 pm) · 1 replies

Hi Everyone,

I've just started playing around with torque, but I've looked around the forums for a long time and I can't find this in the forums. I'm using TGE 1.4, on a mac. There is no modified C++ code or anything, I'm just playing with the scripts at this point. So here's the problem...

I've created two missions (ok, one is barely modified from the tutorial). If I set it up to load either mission when the game starts, it works perfectly. So it *can* load them both just fine.

However, when I set it up to load one of the missions while the other is running, it crashes the whole application. I set up a trigger where onEnterTrigger() calls a function that loads the mission using loadMission()... Everything seems to go fine, then it just crashes. Here's the end of the console.log file, there aren't any errors:


*** ENDING MISSION
*** LOADING MISSION: Puzzlar/data/missions/puzzlarTest.mis
*** Stage 1 load
*** Stage 2 load
Executing Puzzlar/data/missions/puzzlarTest.mis.
*** Mission loaded

After that "Mission loaded" bit, it just crashes.

Thanks,
Ted.

#1
02/13/2006 (5:08 am)
Are you cleaning up all the stuff in memory when you end the first mission? You could be overwriting parts of the old mission or reading areas of memory or globals that are stil hanging around. I think there's an onMissionEnd() function somewhere where you can do that sort of stuff.