You're nowhere close to any house.
#6

pawn Код:
stock LoadHouses()
{
    new id = 1;
    while(id < MAX_HOUSES)
    {
        format(query,sizeof(query),"SELECT * FROM `houses` WHERE `id` = %d",id);
        mysql_query(query);
        mysql_store_result();
        if(mysql_num_rows())
        {
            if(mysql_fetch_row_format(query,"|"))
            {
                sscanf(query,"p<|>fffis[128]ii",HouseInfo[id][hX],HouseInfo[id][hY],HouseInfo[id][hZ],HouseInfo[id][hInt],HouseInfo[id][hName],HouseInfo[id][hPrice],HouseInfo[id][hMoney]);
                CreateHouse(HouseInfo[id][hX],HouseInfo[id][hY],HouseInfo[id][hZ],HouseInfo[id][hInt],HouseInfo[id][hName],HouseInfo[id][hPrice]);
                HouseInfo[id][hIcon] = CreateDynamicMapIcon(HouseInfo[id][hX],HouseInfo[id][hY],HouseInfo[id][hZ],31,-1,-1,-1,-1,50.0);
                printf("hX %f", HouseInfo[id][hX]);
            }
        }
        id++;
    }
    return 1;
}
Try to print some variables, see what it gives. Also you dont need ' ' in your query for integers and instead of MAX_HOUSES queries you can have only one 'SELECT * FROM `houses`'.
Reply


Messages In This Thread
You're nowhere close to any house. - by Tayab - 23.01.2014, 20:56
Re: You're nowhere close to any house. - by Scottas - 23.01.2014, 21:06
Re: You're nowhere close to any house. - by Vince - 23.01.2014, 21:39
Re: You're nowhere close to any house. - by Tayab - 23.01.2014, 23:20
Re: You're nowhere close to any house. - by Tayab - 24.01.2014, 01:22
Re: You're nowhere close to any house. - by Scottas - 24.01.2014, 07:16
Re: You're nowhere close to any house. - by Vince - 24.01.2014, 08:14

Forum Jump:


Users browsing this thread: 1 Guest(s)