Data not saving
#1

My player data is not saving

Код:
//mysql errors
[09:40:30] [plugins/mysql] error #1064 while executing query "UPDATE `players` SET `IP` = '127.0.0.1', `Admin` = 10, `VIP` = 0, `Kills` = 0,`Cookies` = 0,`Cakes` = 0,`Icecream` = 0, `Deaths` = 0, `Score` = 0, `Money` = 10000000, `Hours` = 0,`Minutes` = 0, `RaceWon` = 0, WHERE `ID` = 2": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `ID` = 2' at line 1 (D:\samp folder\ZoneX - ZX\gamemodes\ZoneX.pwn:12824 -> D:\samp folder\ZoneX - ZX\gamemodes\ZoneX.pwn:8314 -> D:\samp folder\ZoneX - ZX\pawno\include\YSI\..\YSI_Data\y_foreach/iterators.inc:613 -> D:\samp folder\ZoneX - ZX\pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc:254 -> D:\samp folder\ZoneX - ZX\pawno\include\sscanf2.inc:228)
PHP код:
//Stock
stock SavePlayerData(playerid)
{
    new 
query[150+1000];
    
mysql_format(mysqlquerysizeof(query), "UPDATE `players` SET `IP` = '%e', `Admin` = %d, `VIP` = %d, `Kills` = %d,`Cookies` = %d,`Cakes` = %d,`Icecream` = %d, `Deaths` = %d, `Score` = %d, `Money` = %d, `Hours` = %d,\
    `Minutes` = %d, `RaceWon` = %d, WHERE `ID` = %d"
,
    
IP[playerid], pData[playerid][Admin], pData[playerid][VIP], pData[playerid][Kills],pData[playerid][Cookies],pData[playerid][Cakes],pData[playerid][Icecream], pData[playerid][Deaths], GetPlayerScore(playerid),\
    
GetPlayerMoney(playerid), pData[playerid][pHours], pData[playerid][pMinutes],pData[playerid][RaceWon],pData[playerid][ID]);
    
mysql_query(mysqlquery);
    return 
1;

Reply


Messages In This Thread
Data not saving - by Loinal - 11.05.2017, 07:55
Re: Data not saving - by Banditul18 - 11.05.2017, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)