29.10.2012, 13:09
I tried it with all the data and with no luck this is with the price, it should be 999 however it is zero:
Here is the code:
pawn Код:
[16:25:04] A house with the cost: 0 has been loaded. //Before
[16:25:04] A house with the cost: 0 has been loaded. //After
pawn Код:
public OnHouseLoaded(playerid)
{
new
idx,
result[256];
mysql_store_result();
while(mysql_fetch_row_format(result, "|"))
{
new string[256];
format(string, sizeof(string), "A house with the cost: %i has been loaded.", HouseInfo[idx][hprice]);
printf(string);
sscanf(result, "p<|>e<is[30]iifffiis[200]>", HouseInfo[idx]);
new houselabel[200];
format(houselabel, sizeof(houselabel), "House ID: %i\nHouse Owner: %s\nHouse Price: $%i\nHouseLevel: %i\nUse /buy to buy this house!", HouseInfo[idx][houseid], HouseInfo[idx][howner], HouseInfo[idx][hprice], HouseInfo[idx][hlevel]);
format(string, sizeof(string), "A house with the cost: %i has been loaded.", HouseInfo[idx][hprice]);
printf(string);
idx++;
}
mysql_free_result();
printf("MySQL: Succesful. Fetched %i rows from the database.", idx+1);
return 1;
}