06.06.2012, 08:45
Try using mysql_store_result beforehand, it's all I can think of as the code looks fine and it does make sense. So for example:
pawn Код:
format(motd, sizeof(motd), "INSERT INTO `cocars` (`vModel`, `vUsage`, `vRespawnDelay`, `vOwner`, `vSpawned`) VALUES ('%d', '%d', '-1', '%s', '1')",
GetPVarInt(playerid, "SelectedForBuy")+400,
CAR_USAGE_PRIVATE,
playername);
mysql_query(motd, INSERT_VEHICLE_QUERY);
mysql_store_result();
printf("MySQL Report: mysql_insert_id is %d.", mysql_insert_id());
mysql_free_result(); // Don't forget to free it then.