27.11.2013, 16:41
That's not how dynamic systems work though.
--
You could either:
1. Create a global variable and set the entrance ID to either true or false if it exists
2. Create a function to get the next empty ID
--
You could either:
1. Create a global variable and set the entrance ID to either true or false if it exists
pawn Код:
new bool: gValidEntrance[MAX_APTS] = {false, ...};
//when loading, load the Apartment ID:
new ID = cache_get_field_content_int(row, "Apartment_ID");
//then
gValidEntrance[ID] = true;
//whenever you attempt to enter a place:
for(new i = 0; i < MAX_APTS; i++)
{
if(gValidEntrance[ID] == true)
{
//The entrance is now valid, shouldn't bug from now on
}
}