16.06.2018, 19:57
I want to make for my PlayerSave multiple lines.
But this Error comes:
PHP код:
mysql_format(handle, query, sizeof(query), "UPDATE users SET level = '%d', leben = '%d', holz = '%d', stein = '%d', eisen = '%d',", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pLeben], PlayerInfo[playerid][pHolz], PlayerInfo[playerid][pStein], PlayerInfo[playerid][pEisen]);
mysql_format(handle, query, sizeof(query), "%s map = '%d', recht = '%d', alive = '%d',",PlayerInfo[playerid][pMap], PlayerInfo[playerid][pRecht], PlayerInfo[playerid][pAlive]);
mysql_format(handle, query, sizeof(query), "%s posx = '%f', posy = '%f', posz = '%f', posarg = '%f',",PlayerInfo[playerid][pPosx], PlayerInfo[playerid][pPosy], PlayerInfo[playerid][pPosz], PlayerInfo[playerid][pPosArg]);
mysql_format(handle, query, sizeof(query), "%s skinid = '%d' WHERE id = '%d'", PlayerInfo[playerid][pSkinid], PlayerInfo[playerid][pID]);
mysql_pquery(handle, query);
Код:
[21:48:24] [ERROR] mysql_format: no value for specifier '%d' passed [21:48:24] [ERROR] mysql_format: no value for specifier '%f' passed [21:48:24] [ERROR] mysql_format: no value for specifier '%d' passed [21:48:24] [ERROR] error #1064 while executing query "UPDATE users SET level = '0', leben = '1', holz = '100', stein = '100', eisen = '100',": 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 '' at line 1