how can i return some value if an entity exist or not?
something like
x = entity
if x exist then freeentity (x)
something like
x = entity
if x exist then freeentity (x)
cube = CreateCube() if cube = 0 then print "mesh creation failed" if cube <> 0 then freeentity cube: cube = 0
Type T_monster Field entity End Type ; Update all monsters. For monster.T_monster = Each T_monster UpdateMonster( monster\entity ) Next Function GetMonsterByEntity.T_monster( entity ) ; NOTE: Returns a pointer to the monster object if the monster entity exists, or a null pointer if it doesn't exist. Local monster.T_monster, result.T_monster For monster = Each T_monster If monster\entity = entity then result = monster Next Return result End Function