Result of passing a type?

Blitz3D Forums/Blitz3D Programming/Result of passing a type?

I agree with Danny. Good advice. If you are calling the function, and there's no info there to be operated on, then you are better off finding out WHY there's nothing there.

A request for help that I see often on these boards is people having problems with Types. A typical question is like this: "I deleted my enemy, and the game crashes, so why is that?" Yes, executing a Return if it's Null is good, but finding our *why* it's Return-ing from a Bull is better still and good programming technique beside.

I also like Danny's post where he said:
If localInstance = null then runtimeerror "Empty type passed to DoStuff()!"


This is a great way to alert you, not only that something's not right, but also a vital clue as to where to start looking for the bug.