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:
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.
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.
Torque Owner Igor Kuryatnikov