forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
pInfo[playerid][ID] = cache_get_field_content_int(0, "ID");
pInfo[playerid][pAdminLevel] = cache_get_field_content_int(0, "pAdminLevel");
pInfo[playerid][Premium] = cache_get_field_content_int(0, "Premium");
pInfo[playerid][pEXP] = cache_get_field_content_int(0, "pEXP");
TogglePlayerSpectating(playerid, false);
GivePlayerMoney(playerid, pInfo[playerid][pEXP]);
SendClientMessage(playerid, -1, "You have successfully logged in.");
SpawnPlayer(playerid);
return true;
}
[09:26:03] [DEBUG] mysql_format - connection: 1, len: 214, format: "SELECT * FROM `users` WHERE `Name` = '%e'"
[09:26:03] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `users` WHERE `Name` = ''", callback: "OnAccountLoad", format: "i"
[09:26:03] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - starting query execution
[09:26:03] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.339 milliseconds
[09:26:03] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[09:26:03] [DEBUG] Calling callback "OnAccountLoad"..
[09:26:03] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
[09:26:03] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[09:26:03] [ERROR] cache_get_field_content_int - invalid datatype
[09:26:03] [DEBUG] cache_get_field_content_int - row: 0, field_name: "pAdminLevel", connection: 1
[09:26:03] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[09:26:03] [ERROR] cache_get_field_content_int - invalid datatype
[09:26:03] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Premium", connection: 1
[09:26:03] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[09:26:03] [ERROR] cache_get_field_content_int - invalid datatype
[09:26:03] [DEBUG] cache_get_field_content_int - row: 0, field_name: "pEXP", connection: 1
[09:26:03] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[09:26:03] [ERROR] cache_get_field_content_int - invalid datatype
[09:26:03] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[09:17:49] [DEBUG] mysql_format - connection: 1, len: 526, format: "UPDATE `users` SET `pEXP` = '%d', `Premium` = %d, `pAdminLevel` = %d WHERE `Name` = '%s'"
[09:17:49] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `users` SET `pEXP` = '0', `Premium` = 0, `pAdminLevel` = ", callback: "(null)", format: "(null)"
[09:17:49] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[09:17:49] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 82.333 milliseconds
[09:17:49] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
query: "SELECT * FROM `users` WHERE `Name` = ''" |
No name is being inserted in query as you can see in the red portion.
Check mysql_format line. |