hey guys... I'm just having a little error in my mysql query, however I can't find it somehow..
pawn Код:
new price = strval(inputtext), Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new query[300];
format(query, 100, "SELECT * FROM `houses`");
mysql_query(query);
mysql_store_result();
new n = mysql_num_rows();
mysql_free_result();
format(query, 100, "INSERT INTO `houses` (`id`, `price`, `x`, `y`, `z`) VALUES (%d, %d, %f, %f, %f)", n, price, x, y, z); // this line I guess
mysql_query(query);
SendClientMessage(playerid, CYAN, "*The house was added and will appear on the next restart");
You put query size to 300, and in format, you put 100. Could be that because I can't find an error in the query itself.