07.07.2016, 11:31
Hi, I'm doing RP server to MySQL R39-5, and faced with such a problem, when you exit from the game is not overwritten by the new data, I use ORM for this. I do not know already what the problem is ...
Translated by translate.******.com
MySQL.log
I do not know why it can not connect to MySQL, please help ...
Translated by translate.******.com
PHP Code:
public OnPlayerDisconnect(playerid, reason)
{
if (P[playerid][_p_ormid]) {
if (P[playerid][_p_in_game] == true)
orm_update(P[playerid][_p_ormid]);
orm_destroy(P[playerid][_p_ormid]);
}
for (new i = 0; i < sizeof(P[]); i++)
P[playerid][E_PLAYER_DATA: i] = 0;
TextDrawDestroy(Logo);
return 1;
}
PHP Code:
[14:26:09] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "corso", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[14:26:09] [DEBUG] CMySQLHandle::Create - creating new connection..
[14:26:09] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[14:26:09] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[14:26:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:26:09] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:26:09] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[14:26:09] [DEBUG] mysql_errno - connection: 1
[14:26:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:26:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:26:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:26:09] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:26:09] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:26:09] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:26:09] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[14:26:09] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[14:27:02] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "corso", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[14:27:02] [DEBUG] CMySQLHandle::Create - creating new connection..
[14:27:02] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[14:27:02] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[14:27:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:27:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:27:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[14:27:02] [DEBUG] mysql_errno - connection: 1
[14:27:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:27:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:27:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[14:27:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:27:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:27:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[14:27:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[14:27:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[14:27:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[14:27:45] [DEBUG] orm_create - table: "accounts", connectionHandle: 1
[14:27:46] [DEBUG] COrm::Create - creating new orm object..
[14:27:46] [DEBUG] COrm::Create - orm object created (id: 1)
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CD78, varname: "UID"
[14:27:46] [DEBUG] orm_addvar_string - orm_id: 1, var: 0316CD7C, var_maxlen: 25, varname: "Name"
[14:27:46] [DEBUG] orm_addvar_string - orm_id: 1, var: 0316CDE0, var_maxlen: 129, varname: "Password"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CFE4, varname: "Access"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CFE8, varname: "Skin"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CFEC, varname: "Cash"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CFF0, varname: "Job_Team"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CFF4, varname: "Lic_Moto"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CFF8, varname: "Lic_Car"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316CFFC, varname: "Lic_Freight"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316D000, varname: "Lic_Boat"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316D004, varname: "Lic_Helicopter"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316D008, varname: "Lic_Aircraft"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316D00C, varname: "Lic_Business"
[14:27:46] [DEBUG] orm_addvar_int - orm_id: 1, var: 0316D010, varname: "Lic_Weapon"
[14:27:46] [DEBUG] orm_setkey - orm_id: 1, varname: "Name"
[14:27:46] [DEBUG] orm_select - orm_id: 1, callback: "OnMySQL_SelectAccount", format: "d"
[14:27:46] [DEBUG] orm_select - generated query: "SELECT `UID`,`Password`,`Access`,`Skin`,`Cash`,`Job_Team`,`Lic_M"
[14:27:46] [DEBUG] CMySQLQuery::Execute[OnMySQL_SelectAccount] - starting query execution
[14:27:46] [DEBUG] CMySQLQuery::Execute[OnMySQL_SelectAccount] - query was successfully executed within 294.226 milliseconds
[14:27:46] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '0', data: "1"
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '1', data: "0DFE0DAC1797504EA997FDB298D22BD872397AA63127F224CC1E7CB65F34F4736C9783F9C01F1C53359219754A33E71A5250D355EF9AF2827254442F1DBF0471"
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '2', data: "7"
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '3', data: "296"
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '4', data: "588"
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '5', data: "0"
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '6', data: "0"
[14:27:46] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '7', data: "1"
[14:27:47] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '8', data: "0"
[14:27:47] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '9', data: "0"
[14:27:47] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '10', data: "0"
[14:27:47] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '11', data: "0"
[14:27:47] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '12', data: "0"
[14:27:47] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '13', data: "0"
[14:27:47] [DEBUG] Calling callback "OnMySQL_SelectAccount"..
[14:27:47] [DEBUG] orm_errno - orm_id: 1
[14:27:47] [DEBUG] orm_setkey - orm_id: 1, varname: "UID"
[14:27:47] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[14:28:14] [DEBUG] orm_update - orm_id: 1
[14:28:14] [DEBUG] orm_update - generated query: "UPDATE `accounts` SET `Password`='0DFE0DAC1797504EA997FDB298D22B"
[14:28:14] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[14:28:15] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 244.418 milliseconds
[14:28:15] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
[14:28:21] [DEBUG] orm_update - orm_id: 1
[14:28:21] [DEBUG] orm_update - generated query: "UPDATE `accounts` SET `Password`='0DFE0DAC1797504EA997FDB298D22B"
[14:28:21] [DEBUG] orm_destroy - orm_id: 1
[14:28:21] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[14:28:21] [DEBUG] COrm::Destroy - orm object destroyed (id: 1)
[14:28:21] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 204.694 milliseconds
[14:28:21] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
[14:28:27] [DEBUG] mysql_close - connection: 1
[14:28:28] [DEBUG] CMySQLConnection::Disconnect - connection was closed
[14:28:28] [DEBUG] CMySQLConnection::Disconnect - connection was closed
[14:28:28] [DEBUG] CMySQLConnection::Disconnect - connection was closed
[14:28:28] [DEBUG] CMySQLConnection::Disconnect - connection was closed
[14:28:28] [WARNING] CMySQLConnection::Disconnect - no connection available
[14:28:28] [DEBUG] CMySQLHandle::~CMySQLHandle - deconstructor called