MySQL Won't load more than 20 rows. -
It literally will not load more than 20 rows, the houses do not exist in game.
I've checked everything, there are no rows missing.
No gaps, no numbers out of place on the MySQL table.
The printf of the rows returns 52 rows (correct) but the houses are not created, at all.
I can't teleport to them or /enter or anything.
I'm entirely at a loss.
pawn Код:
forward LoadHouses();
public LoadHouses()
{
new QueryString[2056];
new x;
new rows, fields;
cache_get_data(rows, fields);
printf("%d rows", rows);
for(new y; y != rows; y++)
{
cache_get_row(y, hid, QueryString);
x = strval( QueryString);
cache_get_row(y, hHouseName, HouseName[x]);
cache_get_row(y,hHouseOwner, QueryString);
HouseOwner[x] = strval( QueryString);
cache_get_row(y,hHouseEntX, QueryString);
HouseEntX[x] = floatstr( QueryString);
cache_get_row(y,hHouseEntY, QueryString);
HouseEntY[x] = floatstr( QueryString);
cache_get_row(y,hHouseEntZ, QueryString);
HouseEntZ[x] = floatstr( QueryString);
cache_get_row(y,hHouseIntX, QueryString);
HouseIntX[x] = floatstr( QueryString);
cache_get_row(y,hHouseIntY, QueryString);
HouseIntY[x] = floatstr( QueryString);
cache_get_row(y,hHouseIntZ, QueryString);
HouseIntZ[x] = floatstr( QueryString);
cache_get_row(y,hHouseInt, QueryString);
HouseInt[x] = strval( QueryString);
cache_get_row(y,hHouseVW, QueryString);
HouseVW[x] = strval( QueryString);
cache_get_row(y,hHousePrice, QueryString);
HousePrice[x] = strval( QueryString);
cache_get_row(y,hHouseLock, QueryString);
HouseLock[x] = strval( QueryString);
cache_get_row(y,hHouseAlarm, QueryString);
HouseAlarm[x] = strval( QueryString);
cache_get_row(y,hHouseDoorLevel, QueryString);
HouseDoorLevel[x] = strval( QueryString);
cache_get_row(y,hForSale, QueryString);
ForSale[x] = strval( QueryString);
cache_get_row(y,hHouseTaxBand, QueryString);
HouseTaxBand[x] = strval( QueryString);
cache_get_row(y,hHouseTaxAmount, QueryString);
HouseTaxAmount[x] = strval( QueryString);
cache_get_row(y, hHouseEvicted, QueryString);
HouseEvicted[x] = strval(QueryString);
cache_get_row(y, hHouseRepo, QueryString);
HouseRepo[x] = strval(QueryString);
HouseEntVW[x] = cache_get_row_int(y, hHouseEntVW);
HouseEntInt[x] = cache_get_row_int(y, hHouseEntInt);
HTaxList[x] = -1;
if(ForSale[x] == 0 && HouseEvicted[x] == 0)
{
HousePickup[x] = CreateDynamicPickup(1273, 23, HouseEntX[x], HouseEntY[x], HouseEntZ[x], HouseEntVW[x], HouseEntInt[x]);
}
if(ForSale[x] == 1 && HouseEvicted[x] == 0)
{
HousePickup[x] = CreateDynamicPickup(19522, 23, HouseEntX[x], HouseEntY[x], HouseEntZ[x], HouseEntVW[x], HouseEntInt[x]);
}
if(HouseEvicted[x] == 1)
{
HousePickup[x] = CreateDynamicPickup(19523, 23, HouseEntX[x], HouseEntY[x], HouseEntZ[x], HouseEntVW[x], HouseEntInt[x]);
}
HouseLabel[x] = CreateDynamic3DTextLabel(HouseName[x], COLOUR_LIGHTBLUE, HouseEntX[x],HouseEntY[x], HouseEntZ[x], 12, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, HouseVW[x], HouseInt[x], -1, 12.0);
}
printf("---------------HOUSES LOADED: %d----------------------", cache_num_rows());
return 1;
}