23.01.2019, 16:44
Entгo, fui fazer a funзгo para criar a conta do player e ao que me parecia o INSERT estava correto, mas ao criar a conta o INSERT retorna um erro no log e nгo insere a linha no banco de dados.
Cуdigo em PAWN:
Erro que retornou no log do MySQL:
Cуdigo em PAWN:
PHP Code:
mysql_format(mysql,
query,
sizeof(query),
"INSERT INTO 'players' \
( \
`pname`, \
`ppassword`, \
`pmoney`, \
`pskin`, \
`pgender`, \
`pcitizenship`, \
`pbirthday`, \
`pbirthmonth`, \
`pbirthyear`, \
`pposx`, \
`pposy`, \
`pposz`, \
`pposa`, \
`pinterior`, \
`pvirtualworld`, \
`pstaff`, \
`plastip` \
) \
VALUES \
( \
'%e', \
'%e', \
'%d', \
'%d', \
'%d', \
'%e', \
'%d', \
'%d', \
'%d', \
'%f', \
'%f', \
'%f', \
'%f', \
'%d', \
'%d', \
'%d', \
'%e' \
)",
pInfo[playerid][pName],
encrypt(password),
pInfo[playerid][pMoney],
pInfo[playerid][pSkin],
pInfo[playerid][pGender],
pInfo[playerid][pCitizenship],
pInfo[playerid][pBirthDay],
pInfo[playerid][pBirthMonth],
pInfo[playerid][pBirthYear],
pInfo[playerid][pPosX],
pInfo[playerid][pPosY],
pInfo[playerid][pPosZ],
pInfo[playerid][pPosA],
pInfo[playerid][pInterior],
pInfo[playerid][pVirtualWorld],
pInfo[playerid][pStaff],
pInfo[playerid][pLastIP]
);
mysql_tquery(mysql, query);
HTML Code:
[plugins/mysql] error #1064 while executing query "INSERT INTO 'players' ( `pname`, `ppassword`, `pmoney`, `pskin`, `pgender`, `pcitizenship`, `pbirthday`, `pbirthmonth`, `pbirthyear`, `pposx`, `pposy`, `pposz`, `pposa`, `pinterior`, `pvirtualworld`, `pstaff`, `plastip` ) VALUES ( 'Teste_Silva', 'sigilo', '500', '3', '1', 'RJ', '23', '1', '1994', '0.000000', '0.000000', '0.000000', '0.000000', '0', '0', '0', '127.0.0.1' )": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''players' ( `pname`, `ppassword`, `pmoney`, `pskin`, `pgender`, `pcitizenship`, ' at line 1