Code:
 
void d_func()
{
my.skill10 = 100;
while(my.skill10 > 0)
{
my.skill10 -= 1;
wait(1);
}
NewtonDestroyBody(nworld, my.skill99);
ent_remove(me);
}

void fireentity()
{
you = ent_create("ball.mdl", &v, d_func);
NewtonBody *body = newton_addentity(you, 10, currentcollisiontype, onforceandtorque); // register entity as physics entity
}



I try to remove the dynamic object from the Newton world after 100 waits, but it gives me crash error and the object is still there.


My Specialities Limited.