House system problem
#6

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:
Код:
stock GetHouseFreeSlot()
{
    for(new i = 0; i < MAX_HOUSES; i++)
	{
        if(hInfo[i][hExists] != true) return i;
	}
	return -1;
}
Reply


Messages In This Thread
House system problem - by Sanady - 11.03.2016, 11:19
Re: House system problem - by dominik523 - 11.03.2016, 11:30
Re: House system problem - by Sanady - 11.03.2016, 11:39
Re: House system problem - by dominik523 - 11.03.2016, 11:42
Re: House system problem - by Sanady - 11.03.2016, 11:45
Re: House system problem - by Runn3R - 11.03.2016, 11:53
Re: House system problem - by dominik523 - 11.03.2016, 11:53
Re: House system problem - by Sanady - 11.03.2016, 12:54
Re: House system problem - by Runn3R - 11.03.2016, 13:00
Re: House system problem - by Sanady - 11.03.2016, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)