11.03.2016, 11:53
You probably defined it as INVALID_HOUSE_ID inside of an enumator and that won't work.
Simply add if the house exists like Bool:hExists if it's false it doesn't exist if its true it exists.
Note that it will always be 0 when initializing so when you load a house you set it to true..
And you check it like:
Simply add if the house exists like Bool:hExists if it's false it doesn't exist if its true it exists.
Note that it will always be 0 when initializing so when you load a house you set it to true..
And you check it like:
Код:
stock GetHouseFreeSlot() { for(new i = 0; i < MAX_HOUSES; i++) { if(hInfo[i][hExists] != true) return i; } return -1; }