Game Development Community

Don't know why it's crashing.

by Justin White · in Torque Game Engine · 07/23/2007 (8:21 am) · 0 replies

I'm having trouble with the SDK crashing. I'm fairly new to C++, but I consider myself an intermidiate programmer as I have familiar with many scripting languages. I have been able to implement a SQLite resource I found as well as find and tweek on my own code that would allow me to run two copies of Torque (in order to simulate Client and Server as different programs to make sure everything works right.)

I've been trying to implement the Mesh Hiding resource found here
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5421

Implemented as instructed, it crashes halfway through building objects. So I tried implementing it one step at a time to try and figure out which part of it is causing the crash.

I get as far as adding bool forceHidden; in MeshObjectInstance (the very first code block in that resource) and it now crashes as soon as it starts loading level data. I've tried both with objInstance->forceHidden=false; and without it (as I wasn't sure if it was needed).

I find it hard to believe that adding a variable declaration to a struct is causing this to crash, is there something else I'm overlooking? The program works fine when I remove these lines so I know that it's these lines that are causing the problem.