MySQL Won't load more than 20 rows.
#1

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.

Any help is appreciated.

Код:
[05:53:23] 52 rows

[05:53:23] HouseEntX 2696.270019
[05:53:23] HouseEntX 2672.729980
[05:53:23] HouseEntX 2652.719970
[05:53:23] HouseEntX 2638.100097
[05:53:23] HouseEntX 2636.409912
[05:53:23] HouseEntX 2649.840087
[05:53:23] HouseEntX 2673.370117
[05:53:23] HouseEntX 2695.429931
[05:53:23] HouseEntX 2150.139892
[05:53:23] HouseEntX 2383.530029
[05:53:23] HouseEntX 2389.729980
[05:53:23] HouseEntX 2387.860107
[05:53:23] HouseEntX 2388.419921
[05:53:23] HouseEntX 2433.600097
[05:53:23] HouseEntX 2434.800048
[05:53:23] HouseEntX 2433.929931
[05:53:23] HouseEntX 2433.929931
[05:53:23] HouseEntX 2439.590087
[05:53:23] HouseEntX 2439.590087
[05:53:23] HouseEntX 2149.989990

//Only prints 20 results from the printf
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)