Jump to content

How to check if object is valid?


Maris

Recommended Posts

Let's say I have a variable:

obj = nil;

Let's say I initialized it somewhere:

for i = 0, worldObjects:size() - 1 do
	obj = worldObjects:get(i);
	break;
end

Then some time passed. The object could be removed from the world.

How to check that the object referenced by a variable still exists?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...