SQL Loading Issue
#4

Not too important, but why are you using those local vars for rows and fields, consider doing this.
pawn Код:
public LoadHouses()
{
    HouseCount = cache_get_row_count();

    for(new i; i <= HouseCount; i++)
    {
        cache_get_field_content(i, "owner", HouseInfo[i][Owner], g_Handle, 24);
        HouseInfo[i][Status] = cache_get_field_content_int(i, "status");
        HouseInfo[i][Interior] = cache_get_field_content_int(i, "interior");
        HouseInfo[i][Price] = cache_get_field_content_int(i, "price");
        HouseInfo[i][XPos] = cache_get_field_content_float(i, "xpos");
        HouseInfo[i][YPos] = cache_get_field_content_float(i, "ypos");
        HouseInfo[i][ZPos] = cache_get_field_content_float(i, "zpos");
        HouseInfo[i][EnterX] = cache_get_field_content_float(i, "enterx");
        HouseInfo[i][EnterY] = cache_get_field_content_float(i, "entery");
        HouseInfo[i][EnterZ] = cache_get_field_content_float(i, "enterz");

        HousePickup[i] = CreatePickup(1273, 1, HouseInfo[i][XPos], HouseInfo[i][YPos], HouseInfo[i][ZPos]);
        CreateHouseLabels(i);
    }

    printf("--- %i houses loaded from the SQL Database. ---", HouseCount);

    return 1;
}
Reply


Messages In This Thread
SQL Loading Issue - by austin070 - 02.10.2015, 00:22
AW: SQL Loading Issue - by Kaliber - 02.10.2015, 00:31
Re: SQL Loading Issue - by austin070 - 02.10.2015, 00:35
Re: SQL Loading Issue - by xVIP3Rx - 02.10.2015, 01:09

Forum Jump:


Users browsing this thread: 1 Guest(s)