10.06.2013, 21:14
Hi all ^^
My code:
No save in Sqlite.db, code of table:
PD: I create POSX, POSY and POSZ in table with Float. But not save, for default in db 0.0
Thx for all, waiting posible fix
My code:
Код:
new string[256]; new Float:posx; new Float:posy; new Float:posz; GetPlayerPos(playerid, posx, posy, posz); format(string, sizeof(string), "UPDATE `PLAYER` SET `POSX` = '%f' AND `POSY` = '%f' AND `POSZ` = '%f' WHERE NAME= '%s'", posx, posy, posz, DB_Escape(NamePlayer(playerid))); db_free_result(db_query(Sqlite, string));
Код:
CREATE TABLE `PLAYER` (`NAME` VARCHAR(45), `SCORE` SMALLINT(5) DEFAULT 0, `KARMA` SMALLINT(5) DEFAULT 0, `POSX` FLOAT DEFAULT 0.0, `POSY` FLOAT DEFAULT 0.0, `POSZ` FLOAT DEFAULT 0.0, `SKIN` SMALLINT(3) DEFAULT 0);
Thx for all, waiting posible fix