Bug or my fault? (types related)

Blitz3D Forums/Blitz3D Beginners Area/Bug or my fault? (types related)


What do you mean by storing the pointer to the single mainjet type in a global?



Please answer this question:
Do you only have ONE main_jet type instance in your game, or do you have several?

If you only have one, then:
Global jet.main_jet

Creates a global pointer to it which can be accessed anywhere in the program. You then call load_mainjet() which creates the main_jet instance and sets jet.main_jet to point at it.

You can now access this main_jet type instance anywhere in your program. If you are getting errors with this, please post the code that causes the error.