I've been having a little trouble with pointers for my bullets. For some reason, sometimes the bullet's impact, entity, or block collision events don't register. And there will be many of them lying around on the ground. So I came up with the idea to use phent_getvelocity to determine whether or not they are still in flight, and if not, remove them.

However, when this occurs, and one is removed, it creates an "empty pointer" error message. I tried giving a specific pointer to each type of bullet, but that turned out to cause a whole bunch of unnecessary trouble. Now they just have an action, that tells them what to do. So how can I create a certain lifespan for bullets, and/or check their speed, and remove a particular one who meets the "dead bullet" criteria, without causing an empty pointer error?

And if you know, any idea why some of them don't run their collision event?