10.02.2012, 16:21
pawn Код:
stock LoadProperty()
{
mysql_query("SELECT * FROM `houses` ORDER BY `houses`.`hid` ASC");
mysql_store_result();
new query[256];
if(mysql_num_rows() > 0)
{
for(new idx = 0; idx < mysql_num_rows(); idx++)
{
mysql_fetch_row(query);
sscanf(query,"p<|>ids[32]ffffffds[20]dds[64]d",
HouseInfo[idx][hid],
HouseInfo[idx][hOwned],
HouseInfo[idx][hOwner],
HouseInfo[idx][hEntrancex],
HouseInfo[idx][hEntrancey],
HouseInfo[idx][hEntrancez],
HouseInfo[idx][hExitx],
HouseInfo[idx][hExity],
HouseInfo[idx][hExitz],
HouseInfo[idx][hHealthx],
HouseInfo[idx][hHealthy],
HouseInfo[idx][hHealthz],
HouseInfo[idx][hArmourx],
HouseInfo[idx][hArmoury],
HouseInfo[idx][hArmourz],
HouseInfo[idx][hValue],
HouseInfo[idx][hHel],
HouseInfo[idx][hArm],
HouseInfo[idx][hInt],
HouseInfo[idx][hLock],
HouseInfo[idx][hRooms],
HouseInfo[idx][hRent],
HouseInfo[idx][hRentabil],
HouseInfo[idx][hTakings],
HouseInfo[idx][hSetted],
HouseInfo[idx][hLevel],
HouseInfo[idx][hWorld],
HouseInfo[idx][hDrugs],
HouseInfo[idx][hMaterials],
HouseInfo[idx][hWeapon1],
HouseInfo[idx][hAmmo1],
HouseInfo[idx][hWeapon2],
HouseInfo[idx][hAmmo2],
HouseInfo[idx][hWeapon3],
HouseInfo[idx][hAmmo3],
HouseInfo[idx][hWeapon4],
HouseInfo[idx][hAmmo4],
HouseInfo[idx][hWeapon5],
HouseInfo[idx][hAmmo5],
HouseInfo[idx][hWeapon6],
HouseInfo[idx][hAmmo6],
HouseInfo[idx][hMessage]);
MAXHOUSES++;
}
}
mysql_free_result(),
printf("\nHouses From Database Loaded"),
printf("\nInfo:Houses From Database:%d\n",MAXHOUSES);
return 1;
}
I know that I have mistake in this line
pawn Код:
sscanf(query,"p<|>ids[32]ffffffds[20]dds[64]d",