Checking if enum is not used
#1

How can I check if the enum variables are empty? I have a house system and I want to place the new house in the closest empty (unused) variable.

ie:

enum test
{
ID,
something
}

and if I have a loop, how to check if the lets say, ID variable empty?

for(new i=0; i<5;i++)
{
if(ID = )
....
}

I cant use 0 cause it is also used as an ID in my script and it is not defined at the start. How to check if it is empty?
Reply
#2

IsNull ?
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
If you can't use 0 then you need to figure out another number that you can use and do that instead. You will also need to initialise the whole of the array to that value to begin with.
That's what I thought about too. I think I'll use that. But, is the IsNull good to use or not?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)