04.04.2019, 13:13
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");
}
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");
}