12.01.2012, 10:39
You don't free the result before storing another one. I also recommend loading the cars without using a loop.
pawn Код:
stock initiateCars()
{
new id;
mysql_query("SELECT * FROM `cars`");
mysql_store_result();
while(mysql_retrieve_row())
{
id++;
mysql_fetch_row_format(Query, "|")
sscanf(Query, "p<|>e<is[24]ffffffffiis[24]s[24]is[32]s[32]iiiiiiiiiiiiiiiiiiiii>", CarInfo[id]);
CreateVehicle(CarInfo[id][cModel], CarInfo[id][cLocationx], CarInfo[id][cLocationy], CarInfo[id][cLocationz]+1.0, CarInfo[id][cAngle], CarInfo[id][cColorOne], CarInfo[id][cColorTwo], 600000);
gCarLock[id] = 1;
SetVehicleNumberPlate(id, CarInfo[id][cLicense]);
LoadComponents(id);
}
mysql_free_result();
}