EntityExists()?

Blitz3D Forums/Blitz3D Programming/EntityExists()?

A couple weeks ago I was asking about the same thing. I/we concluded nothing like this exists in the commands, and a lot of people told me I'm a bad programmer for writing routines in which it is possible for my functions to attempt to do something with an entity which no longer exists. Frankly though I think this would be a very useful command. No matter how careful you are, in a large program you can never be 100% sure, so basic error trapping with an EntityExists command is vital.

What I couldn't understand is that people think checking if a load was successful before using loaded data makes sense, but these same people think checking if an entity exists before using it is lazy. The way I see it, if it'll crash your program then it's something to check for.

Psychicparrot: That only helps for a specific handle. You can check if a specific handle has been set to zero (since handles are just integer variables,) but you can't check if the entity a handle points to actually exists.