Hello guys,

I currently have a savepos system in mysql that saves your positition on registration and can load it without a problem. The only thing that doesn't work is saving the position OnPlayerDisconnect. When I log out the data at the table doesn't change. This is my code:

new DB_Query[256];
GetPlayerPos(playerid, pData[playerid][PosX], pData[playerid][PosY], pData[playerid][PosZ]);
mysql_format(MYSQL_CONNECT, DB_Query, sizeof(DB_Query), "UPDATE `Players` SET `PosX` = %f, `PosY` = %f, `PosZ` = %f WHERE `SQLID` = %d LIMIT 1", pData[playerid][PosX], pData[playerid][PosY], pData[playerid][PosZ], pData[playerid][SQLID]);

I have changed the quotes and removed the LIMIT clause but still, it doesn't work. If OnPlayerDisconnect can cause problems sometimes, where would you save the data then? I am still very new at MYSQL so I do not fully understand how many cells the query needs.

Forum Jump:

Users browsing this thread: 1 Guest(s)