You're nowhere close to any house.
#4

Any suggestion how to check if money is greater than the house price without loop? Or I create another loop above this one?

Plus, is there anyway I can covert those loops to foreach ones?

Thanks for replies!

+rep

EDIT: I realized it doesn't load the houses actually. Can't figure out what is wrong.

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);
            }
        }
        id++;
    }
    return 1;
}
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: