stock SalvarConta(playerid)
{
Dados[playerid][pDinheiro] = GetPlayerMoney(playerid);
Dados[playerid][pSkin] = GetPlayerSkin(playerid);
format(Query, sizeof(Query), "UPDATE contas SET 'nick' = '%s', 'admin' = '%d', 'skin' = '%d', 'dinheiro' = '%d', 'score' = '%d', 'cmd' = '%d', 'tca' = '%d', 'mlc' = '%d', 'pm' = '%d', 'orgs' = '%d', 'favelas' = '%d', 'fgt' = '%d', 'vpr' = '%d', 'grt' = '%d', 'frt' = '%d', 'dc' = '%d', \
'fogos' = '%d', 'maconha' = '%d', 'cocaina' = '%d', 'ecstasy' = '%d', 'mp' = '%d', 'sp' = '%d', 'matou' = '%d', 'mortes' = '%d', 'procurado' = '%d' WHERE 'ID' = '%d'",
Nome(playerid),
Dados[playerid][pAdmin],
Dados[playerid][pSkin],
Dados[playerid][pDinheiro],
Dados[playerid][pScore],
Dados[playerid][pCMD],
Dados[playerid][pTCA],
Dados[playerid][pMLC],
Dados[playerid][pPM],
Dados[playerid][pOrg],
Dados[playerid][pFavelas],
Dados[playerid][pFGT],
Dados[playerid][pVPR],
Dados[playerid][pGRT],
Dados[playerid][pFRT],
Dados[playerid][pDC],
Dados[playerid][pMaconha],
Dados[playerid][pCocaina],
Dados[playerid][pEcstasy],
Dados[playerid][pFogos],
MinutosP[playerid],
SegundosP[playerid],
Dados[playerid][pMatou],
Dados[playerid][pMortes],
Dados[playerid][pProcurado],
Dados[playerid][pID]);
mysql_query(ConexaoBDD, Query, false);
return 1;
}
[07:09:00] [WARNING] mysql_connect: no password specified
[07:12:12] [WARNING] mysql_connect: no password specified
[07:12:30] [ERROR] error #1064 while executing query "UPDATE contas SET 'nick' = 'DelK', 'admin' = '0', 'skin' = '0', 'dinheiro' = '0', 'score' = '0', 'cmd' = '1', 'tca' = '0', 'mlc' = '0', 'pm' = '0', 'orgs' = '0', 'favelas' = '1', 'fgt' = '0', 'vpr' = '0', 'grt' = '0', 'frt' = '0', 'dc' = '0', 'fogos' = '0', 'maconha' = '0', 'cocaina' = '0', 'ecstasy' = '0', 'mp' = '59', 'sp' = '47', 'matou' = '0', 'mortes' = '0', 'procurado' = '0' WHERE 'ID' = '1'": Erreur de syntaxe prиs de ''nick' = 'DelK', 'admin' = '0', 'skin' = '0', 'dinheiro' = '0', 'score' = '0', '' а la ligne 1
[22:55:55] [INFO] received Windows console close event; shutting log-core down
[07:09:44] [INFO] received Windows console close event; shutting log-core down
[07:13:04] [INFO] received Windows console close event; shutting log-core down
[11:44:04] [WARNING] mysql_connect: no password specified
[11:44:05] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'localhost' (10061)'
[11:44:06] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'localhost' (10061)'
[11:44:07] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'localhost' (10061)'
[11:45:08] [WARNING] mysql_connect: no password specified
[11:45:49] [ERROR] error #1054 while executing query "UPDATE contas SET `nick`=DelK,`admin`=0,`skin`=0,`dinheiro`=0,`score`=0,`cmd`=1,`tca`=0,`mlc`=0,`pm`=0,`orgs`=0,`favelas`=1,`fgt`=0,`vpr`=0,`grt`=0,`frt`=0,`dc`=0, `fogos`=0,`maconha`=0,`cocaina`=0,`ecstasy`=0,`mp`=59,`sp`=51,`matou`=0,`mortes`=0,`procurado`=0 WHERE ID =1": Champ 'admin' inconnu dans field list
Coloquei como vocк disse e agora deu esses.
PHP код:
|
`nick`='DelK'
Valores do tipo string vocк tem que colocar aspas simples ' '.
PHP код:
|
format(Query, sizeof(Query), "UPDATE `contas` SET `nick`='%s',`dinheiro`=%d,`score`=%d,`cmd`=%d,`tca`=%d,`mlc`=%d,`pm`=%d,`orgs`=%d,`favelas`=%d,`fgt`=%d,`vpr`=%d,`grt`=%d,`frt`=%d,`dc`=%d, \
`fogos`=%d,`maconha`=%d,`cocaina`=%d,`ecstasy`=%d,`mp`=%d,`sp`=%d,`matou`=%d,`mortes`=%d,`procurado`=%d WHERE ID=%d",
[11:44:05] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'localhost' (10061)'
[11:44:06] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'localhost' (10061)' [11:44:07] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'localhost' (10061)' [/php] |
Sу falta o
Код:
[WARNING] mysql_connect: no password specified Код:
[ERROR] error #1064 while executing query "UPDATE contas SET 'nick' = 'DelK', 'admin' = '0', 'skin' = '0', 'dinheiro' = '0', 'score' = '0', 'cmd' = '1', 'tca' = '0', 'mlc' = '0', 'pm' = '0', 'orgs' = '0', 'favelas' = '1', 'fgt' = '0', 'vpr' = '0', 'grt' = '0', 'frt' = '0', 'dc' = '0', 'fogos' = '0', 'maconha' = '0', 'cocaina' = '0', 'ecstasy' = '0', 'mp' = '59', 'sp' = '47', 'matou' = '0', 'mortes' = '0', 'procurado' = '0' WHERE 'ID' = '1'": Erreur de syntaxe prиs de ''nick' = 'DelK', 'admin' = '0', 'skin' = '0', 'dinheiro' = '0', 'score' = '0', '' а la ligne 1 |
stock SalvarConta(playerid)
{
Dados[playerid][pDinheiro] = GetPlayerMoney(playerid);
Dados[playerid][pSkin] = GetPlayerSkin(playerid);
format(Query, sizeof(Query), "UPDATE contas SET `nick`='%s',`admin`='%d',`skin`='%d',`dinheiro`='%d',`score`='%d',`cmd`='%d',`tca`='%d',`mlc`='%d',`pm`='%d',`orgs`='%d',`favelas`='%d',`fgt`='%d',`vpr`='%d',`grt`='%d',`frt`='%d',`dc`='%d',\
`fogos`='%d',`maconha`='%d',`cocaina`='%d',`ecstasy`='%d',`mp`='%d',`sp`='%d',`matou`='%d',`mortes`='%d',`procurado`='%d' WHERE `ID`='%d'",
Nome(playerid),
Dados[playerid][pAdmin],
Dados[playerid][pSkin],
Dados[playerid][pDinheiro],
Dados[playerid][pScore],
Dados[playerid][pCMD],
Dados[playerid][pTCA],
Dados[playerid][pMLC],
Dados[playerid][pPM],
Dados[playerid][pOrg],
Dados[playerid][pFavelas],
Dados[playerid][pFGT],
Dados[playerid][pVPR],
Dados[playerid][pGRT],
Dados[playerid][pFRT],
Dados[playerid][pDC],
Dados[playerid][pMaconha],
Dados[playerid][pCocaina],
Dados[playerid][pEcstasy],
Dados[playerid][pFogos],
MinutosP[playerid],
SegundosP[playerid],
Dados[playerid][pMatou],
Dados[playerid][pMortes],
Dados[playerid][pProcurado],
Dados[playerid][pID]);
mysql_query(ConexaoBDD, Query, false);
}