Game Development Community

Crash

by Vern Jensen · in Torque Game Builder · 04/24/2007 (1:03 pm) · 1 replies

Got TGB 1.5 Beta 3 on Mac to crash by doing this in script:

function createPlayerBullet()
{
	return new t2dStaticSprite() 
		{ 
			scenegraph = %this.scenegraph; 
			class = playerBullet; 
			speed=80;
			angle = $pShip.getRotation();
			player = $pShip; 
		}; 
}

and calling it with:

createPlayerBullet();

Notice that the function createPlayerBullet() accesses "%this" which I had forgotten to pass as a parameter to the function. HOWEVER, TGB should not *crash* as a result of a script mistake. The whole program just bombed.

#1
05/09/2007 (10:39 pm)
It seems, you should specify an imagemap datablock and frame. The scenegraph doen't matter.