Mysql Float problem
#4

Ok so now i used Double for it... But now the loading is still failing O_O
pawn Код:
LoadHouses()
{
    print("Houses are being loaded");
    mysql_query("SELECT NULL FROM Houses");
    mysql_store_result();
    new rows = mysql_num_rows();
    mysql_free_result();
   
    CheckMySQL();
   
    for(new i; i < rows; i++)
    {
        new string[128], string2[128];
        format(string, sizeof(string), "SELECT * FROM Houses WHERE HouseID = '%d'", i);
        mysql_query(string);
        mysql_store_result();
       
        new row[128];
        new field[11][24];
        mysql_fetch_row_format(row, "|");
        explode(row, field, "|");
        mysql_free_result();
        AHouseData[i][ID] = strval(field[0]);
        AHouseData[i][price] = strval(field[1]);
        format(AHouseData[i][Owner], 24, "%s", field[2]);
        AHouseData[i][HouseX] = strval(field[3]);
        AHouseData[i][HouseY] = strval(field[4]);
        AHouseData[i][HouseZ] = strval(field[5]);
        if(strlen(AHouseData[i][Owner]) > 0)
        {
            CreatePickup(1272, 1, AHouseData[i][HouseX], AHouseData[i][HouseY], AHouseData[i][HouseZ] + 0.5, -1);
            format(string2, sizeof(string2), "This house is owned by:\n%s", AHouseData[i][Owner]);
        }
        else
        {
            CreatePickup(1273, 1, AHouseData[i][HouseX], AHouseData[i][HouseY], AHouseData[i][HouseZ] + 0.5, -1);
            format(string2, sizeof(string2), "This house is for sale!\nPrice: %i\n Type /buyhouse to buy", AHouseData[i][price]);
        }
        CreateDynamic3DTextLabel(string2, 0x008080FF, AHouseData[i][HouseX], AHouseData[i][HouseY], AHouseData[i][HouseZ] + 1.5, 40.0);
        printf("House %d created", i);
    }
    print("Loading finished");
}
Anyone an idea?
Reply


Messages In This Thread
Mysql Float problem - by thimo - 13.01.2012, 07:10
Re: Mysql Float problem - by [HiC]TheKiller - 13.01.2012, 07:14
Re: Mysql Float problem - by thimo - 13.01.2012, 07:15
Re: Mysql Float problem - by thimo - 13.01.2012, 08:00
Re : Mysql Float problem - by jaskiller - 13.01.2012, 08:05
Re: Mysql Float problem - by Ricop522 - 13.01.2012, 11:03
Re: Mysql Float problem - by thimo - 13.01.2012, 12:54

Forum Jump:


Users browsing this thread: 1 Guest(s)