29.12.2014, 13:21
He does not insert anything in my database.
Public OnPlayerDisconnect:
DialogRegister:
Log MySQL:
Public OnPlayerDisconnect:
pawn Код:
mysql_format(Mysql, Query, sizeof(Query), "UPDATE `contas` SET `Score`='%d', `Dinheiro`='%d', `Gold`='%d', `Matou`='%d', `Mortes`='%d', `Skin`='%d', `Logou`='%d', `Torcida`='%d', `UltimoDia`='%d', `UltimoMes`='%d', ", Dados[playerid][Score], Dados[playerid][Dinheiro], Dados[playerid][Gold], Dados[playerid][Matou], Dados[playerid][Mortes], Dados[playerid][Skin], Dados[playerid][Logou], Dados[playerid][Torcida], Dados[playerid][Dia], Dados[playerid][Mes]);
strcat(query, Query);
mysql_format(Mysql, Query, sizeof(Query), "`UltimoAno`='%d', `UltimoHoras`='%d', `UltimoMinutos`='%d', `UltimoSegundos`='%d', `ReportesLidos`='%d', `Maconha`='%d', `Crack`='%d', `Heroina`='%d', `Cocaina`='%d', ", Dados[playerid][Ano], Dados[playerid][Horas], Dados[playerid][Minuto], Dados[playerid][Segundo], Dados[playerid][RptLidos], Dados[playerid][Maconha], Dados[playerid][Crack], Dados[playerid][Heroina], Dados[playerid][Cocaina]);
strcat(query, Query);
mysql_format(Mysql, Query, sizeof(Query), "`Sinalizador`='%d', `Admin`='%d', `Vip`='%d', `Gamemaster`='%d', `Organizador`='%d', `Puxador`='%d', `Presidente`='%d', `VPresidente`='%d', `TempoVip`='%d', `Batalhao`='%d',", Dados[playerid][Sinalizador], Dados[playerid][Admin], Dados[playerid][Vip], Dados[playerid][Gm], Dados[playerid][Orgi], Dados[playerid][Pux], Dados[playerid][Pres], Dados[playerid][VPres], Dados[playerid][TmpVip], Dados[playerid][Btl]);
strcat(query, Query);
mysql_format(Mysql, Query, sizeof(Query), "`Coronel`='%d', `Calado`='%d', `Preso`='%d', `TempoCalado`='%d', `TempoPreso`='%d', `Banido`='%d',`TempoBanido`='%d', `Profissao`='%d', `Salario`='%d', `NascerColete`='%d', ", Dados[playerid][Cel], Dados[playerid][Calado], Dados[playerid][Preso], Dados[playerid][TempoCalado], Dados[playerid][TempoPreso], Dados[playerid][Banido], Dados[playerid][TempoBanido], Dados[playerid][Profissao], Dados[playerid][Salario], Dados[playerid][NascerColete]);
strcat(query, Query);
mysql_format(Mysql, Query, sizeof(Query), "`NascerArma`='%d', `TempoColete`='%d', `TempoArma`='%d', `IDArma`='%d' WHERE `ID`='%d'", Dados[playerid][NascerArma], Dados[playerid][TempoColete], Dados[playerid][TempoArma], Dados[playerid][IDArma]);
strcat(query, Query);
mysql_tquery(Mysql, query, "", "");
pawn Код:
mysql_format(Mysql, query, sizeof(query), "INSERT INTO `contas` (`Nome`, `Senha`, `IP`, `Score`,`Dinheiro`,`Gold`,`Matou`,`Mortes`,`Skin`,`Logou`,`Torcida`,`UltimoDia`,`UltimoMes`, ");
strcat(Query, query);
mysql_format(Mysql, query, sizeof(query), "`UltimoAno`,`UltimoHoras`,`UltimoMinutos`,`UltimoSegundos`,`ReportesLidos`,`Maconha`,`Crack`,`Heroina`,`Cocaina`,`Sinalizador`,`Admin`,`Vip`,`Gamemaster`,`Organizador`,`Puxador`,`Presidente`,`VPresidente`,`TempoVip`,`Batalhao`,`Coronel`,`Calado`,`Preso`,`TempoCalado`,`TempoPreso`,`Banido`,`TempoBanido`,`Profissao`,`Salario`,`NascerColete`,`NascerArma`,`TempoColete`,`TempoArma`,`IDArma`)");
strcat(Query, query);
mysql_format(Mysql, query, sizeof(query), "VALUES ('%e', '%s', '%s', 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0)", Nome(playerid), inputtext, IP[playerid]);
strcat(Query, query);
mysql_tquery(Mysql, Query, "OnAccountRegister", "i", playerid);
Log MySQL:
Код:
[12:03:22] [DEBUG] mysql_connect - host: "127.0.0.1", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true [12:03:22] [DEBUG] CMySQLHandle::Create - creating new connection.. [12:03:22] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called [12:03:22] [DEBUG] CMySQLHandle::Create - connection created with ID = 1 [12:03:22] [DEBUG] CMySQLConnection::Connect - connection was successful [12:03:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [12:03:22] [DEBUG] CMySQLConnection::Connect - connection was successful [12:03:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [12:03:22] [DEBUG] mysql_errno - connection: 1 [12:03:47] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Senha`, `ID` FROM `contas` WHERE `Nome` = '%e' LIMIT 1" [12:03:47] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Senha`, `ID` FROM `contas` WHERE `Nome` = '[P]edro' LIMI", callback: "OnAccountCheck", format: "i" [12:03:47] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called [12:03:47] [DEBUG] mysql_tquery - scheduling query "SELECT `Senha`, `ID` FROM `contas` WHERE `Nome` = '[P]edro' LIMIT 1".. [12:03:47] [DEBUG] CMySQLQuery::Execute[OnAccountCheck(i)] - starting query execution [12:03:47] [DEBUG] CMySQLQuery::Execute[OnAccountCheck(i)] - query was successful [12:03:47] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [12:03:47] [DEBUG] CMySQLQuery::Execute[OnAccountCheck(i)] - data being passed to ProcessCallbacks() [12:03:47] [DEBUG] Calling callback "OnAccountCheck".. [12:03:47] [DEBUG] cache_get_data - connection: 1 [12:03:47] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [12:03:47] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called [12:03:50] [DEBUG] mysql_format - connection: 1, len: 300, format: "INSERT INTO `contas` (`Nome`, `Senha`, `IP`, `Score`,`Dinheiro`,`Gold`,`Matou`,`Mortes`,`Skin`,`Logou`,`Torcida`,`UltimoDia`,`Ul..." [12:03:50] [DEBUG] mysql_format - connection: 1, len: 300, format: "`UltimoAno`,`UltimoHoras`,`UltimoMinutos`,`UltimoSegundos`,`ReportesLidos`,`Maconha`,`Crack`,`Heroina`,`Cocaina`,`Sinalizador`,`..." [12:03:50] [ERROR] mysql_format - destination size is too small [12:03:50] [DEBUG] mysql_format - connection: 1, len: 300, format: "VALUES ('%e', '%s', '%s', 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0..." [12:03:50] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `contas` (`Nome`, `Senha`, `IP`, `Score`,`Dinheiro`,", callback: "OnAccountRegister", format: "i" [12:03:50] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called [12:03:50] [DEBUG] mysql_tquery - scheduling query "INSERT INTO `contas` (`Nome`, `Senha`, `IP`, `Score`,`Dinheiro`,`Gold`,`Matou`,`Mortes`,`Skin`,`Logou`,`Torcida`,`UltimoDia`,`UltimoMes`, `UltimoAno`,`UltimoHoras`,`UltimoMinutos`,`UltimoSegundos`,`ReportesLidos`,`Maconha`,`Crack`,`Heroina`,`Cocaina`,`Sinalizador`,`Admin`,`Vip`,`Gamemaster`,`Organizador`,`Puxador`,`Presidente`,`VPresidente`,`TempoVip`,`Batalhao`,`Coronel`,`Calado`,`Preso`,`TempoCalado`,`TempoPreso`,`Banido`,`TempoBanVALUES ('[P]edro', 'pedex29', '127.0.0.1', 0, 0, 0, 0, 0,0, 0, 0, 0, 0,0, 0".. [12:03:50] [DEBUG] CMySQLQuery::Execute[OnAccountRegister(i)] - starting query execution [12:03:50] [ERROR] CMySQLQuery::Execute[OnAccountRegister(i)] - (error #1064) 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 '' at line 1 [12:03:50] [DEBUG] CMySQLQuery::Execute[OnAccountRegister(i)] - error will be triggered in OnQueryError [12:03:50] [DEBUG] CMySQLQuery::Execute[OnAccountRegister(i)] - data being passed to ProcessCallbacks() [12:03:50] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called [12:03:56] [DEBUG] mysql_format - connection: 1, len: 200, format: "UPDATE `contas` SET `Score`='%d', `Dinheiro`='%d', `Gold`='%d', `Matou`='%d', `Mortes`='%d', `Skin`='%d', `Logou`='%d', `Torcida..." [12:03:56] [DEBUG] mysql_format - connection: 1, len: 200, format: "`UltimoAno`='%d', `UltimoHoras`='%d', `UltimoMinutos`='%d', `UltimoSegundos`='%d', `ReportesLidos`='%d', `Maconha`='%d', `Crack`..." [12:03:56] [DEBUG] mysql_format - connection: 1, len: 200, format: "`Sinalizador`='%d', `Admin`='%d', `Vip`='%d', `Gamemaster`='%d', `Organizador`='%d', `Puxador`='%d', `Presidente`='%d', `VPresid..." [12:03:56] [DEBUG] mysql_format - connection: 1, len: 200, format: "`Coronel`='%d', `Calado`='%d', `Preso`='%d', `TempoCalado`='%d', `TempoPreso`='%d', `Banido`='%d',`TempoBanido`='%d', `Profissao..." [12:03:56] [DEBUG] mysql_format - connection: 1, len: 200, format: "`NascerArma`='%d', `TempoColete`='%d', `TempoArma`='%d', `IDArma`='%d' WHERE `ID`='%d'" [12:03:56] [ERROR] mysql_format - no value for specifier "%d" available [12:03:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `contas` SET `Score`='0', `Dinheiro`='0', `Gold`='0', `Ma", callback: "(null)", format: "(null)" [12:03:56] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called [12:03:56] [DEBUG] mysql_tquery - scheduling query "UPDATE `contas` SET `Score`='0', `Dinheiro`='0', `Gold`='0', `Matou`='0', `Mortes`='0', `Skin`='0', `Logou`='0', `Torcida`='1', `UltimoDia`='0', `UltimoMes`='0', `UltimoAno`='0', `UltimoHoras`='0', `UltimoMinutos`='0', `UltimoSegundos`='0', `ReportesLidos`='0', `Maconha`='0', `Crack`='0', `Heroina`='0', `Cocaina`='0', `Sinalizador`='0', `Admin`='0', `Vip`='0', `Gamemaster`='0', `Organizador`='0', `Puxador`='0', `Presidente`='0', `VPresidente`='0', `TempoVip`='0', `Batalhao`='0',`Coronel`='0', `Calado`='0', ".. [12:03:56] [DEBUG] CMySQLQuery::Execute[()] - starting query execution [12:03:56] [DEBUG] CMySQLQuery::Execute[()] - query was successful [12:03:56] [DEBUG] CMySQLQuery::Execute[()] - no callback specified, skipping result saving [12:03:56] [DEBUG] CMySQLQuery::Execute[()] - data being passed to ProcessCallbacks() [12:03:56] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called