Houses load from the data base
#1

I have this in my gamemode wich i downloaded and i don't understand,why is theres a "h = i - 1",i mean "i" is the row,and at the same time the house number,like when "i" is 2,it takes the ID for example from the second row from the `houses` tabel in the database,and the second row is also the second house so what if it's scripted lile this


for(new i = 1; i <= housess; i++)
{

HouseInfo[i][hID] = cache_get_field_content_int(i, "ID"); Here it's getting the id from row "i",not row "h",and i dont understand why isnt this correct.


}


This is the part from the gamemode

for(new i = 1; i <= housess; i++)
{
new h = i - 1;

HouseInfo[i][hID] = cache_get_field_content_int(h, "ID");

}
Reply


Messages In This Thread
Houses load from the data base - by bosmania - 04.04.2019, 13:13
Re: Houses load from the data base - by rockys - 04.04.2019, 13:21
Re: Houses load from the data base - by bosmania - 04.04.2019, 13:25
Re: Houses load from the data base - by Logic_ - 04.04.2019, 18:54

Forum Jump:


Users browsing this thread: 1 Guest(s)