30.09.2015, 20:19
Ok ignore my last topic. I have a problem with my MySql login system, this is what is printed in mysq_log.txt file:
But the fields are created in the "players" table:
http://s10.postimg.org/dk0nybmex/Immagine.jpg
This is the stock which handles the login:
If you need more code feel free to ask.
Quote:
[16:15:36] [DEBUG] Calling callback "CheckAcc".. [16:15:36] [DEBUG] cache_get_row_count - connection: 1 [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "IP", connection: 1, max_len: 129 [16:15:36] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "IP", data: "HIDDEN IP" [16:15:36] [DEBUG] mysql_tquery - connection: 1, query: "SELECT RegisterDate, Admin, VIP, Money, Score, Deaths, MissionsP", callback: "(null)", format: "(null)" [16:15:36] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called [16:15:36] [DEBUG] mysql_tquery - scheduling query "SELECT RegisterDate, Admin, VIP, Money, Score, Deaths, MissionsPlayed, VipTime, Warns, Cookies, Jailed, Muted, Duty, Nopm FROM players WHERE Username = 'Face9000'".. [16:15:36] [DEBUG] cache_get_row_count - connection: 1 [16:15:36] [DEBUG] cache_get_field_count - connection: 1 [16:15:36] [DEBUG] cache_get_row - row: 0, field_idx: 0, connection: 1, max_len: 512 [16:15:36] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '0', data: "FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE89 23B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD970 1A4FCFB248FA7FA77B95180628BB2" [16:15:36] [DEBUG] cache_get_row - row: 0, field_idx: 1, connection: 1, max_len: 512 [16:15:36] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '1', data: "HIDDEN IP" [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "RegisterDate", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("RegisterDate") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Admin", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Admin") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "VIP", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("VIP") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Cash", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Cash") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Score", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Score") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Deaths", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Deaths") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "MissionsPlayed", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("MissionsPlayed") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "VipTime", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("VipTime") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Warns", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Warns") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Cookies", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Cookies") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Jailed", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Jailed") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Muted", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Muted") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Duty", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Duty") [16:15:36] [DEBUG] cache_get_field_content - row: 0, field_name: "Nopm", connection: 1, max_len: 20 [16:15:36] [WARNING] CMySQLResult::GetRowDataByName - field not found ("Nopm") [16:15:36] [DEBUG] cache_get_row_count - connection: 1 [16:15:36] [DEBUG] cache_get_field_count - connection: 1 [16:15:36] [DEBUG] cache_get_row - row: 1, field_idx: 0, connection: 1, max_len: 512 [16:15:36] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('0') [16:15:36] [DEBUG] cache_get_row - row: 1, field_idx: 1, connection: 1, max_len: 512 [16:15:36] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('1') |
http://s10.postimg.org/dk0nybmex/Immagine.jpg
This is the stock which handles the login:
Код:
stock MySQL_Login(playerid) { new query2[650], pname[24], savingstring[20]; WP_Hash(query2, 650, savingstring); GetPlayerName(playerid, pname, 24); format(query2, sizeof(query2), "SELECT RegisterDate, Admin, VIP, Money, Score, Deaths, MissionsPlayed, VipTime, Warns, Cookies, Jailed, Muted, Duty, Nopm FROM players WHERE Username = '%s'", pname); mysql_function_query(mConnectionHandle, query2, false, "", ""); mysql_store_result(); while(mysql_fetch_row_format(query2,"|")) { mysql_fetch_field_row(savingstring, "RegisterDate"); PlayerInfo[playerid][RegisterDate] = strval(savingstring); mysql_fetch_field_row(savingstring, "Admin"); PlayerInfo[playerid][Admin] = strval(savingstring); mysql_fetch_field_row(savingstring, "VIP"); PlayerInfo[playerid][VIP] = strval(savingstring); mysql_fetch_field_row(savingstring, "Cash"); SetPlayerCash(playerid, strval(savingstring)); mysql_fetch_field_row(savingstring, "Score"); SetPlayerScore(playerid, strval(savingstring)); mysql_fetch_field_row(savingstring, "Deaths"); PlayerInfo[playerid][Deaths] = strval(savingstring); mysql_fetch_field_row(savingstring, "MissionsPlayed"); PlayerInfo[playerid][MissionsPlayed] = strval(savingstring); mysql_fetch_field_row(savingstring, "VipTime"); PlayerInfo[playerid][VipTime] = strval(savingstring); mysql_fetch_field_row(savingstring, "Warns"); PlayerInfo[playerid][Warns] = strval(savingstring); mysql_fetch_field_row(savingstring, "Cookies"); PlayerInfo[playerid][Cookies] = strval(savingstring); mysql_fetch_field_row(savingstring, "Jailed"); PlayerInfo[playerid][Jailed] = strval(savingstring); mysql_fetch_field_row(savingstring, "Muted"); PlayerInfo[playerid][Muted] = strval(savingstring); mysql_fetch_field_row(savingstring, "Duty"); PlayerInfo[playerid][Duty] = strval(savingstring); mysql_fetch_field_row(savingstring, "Nopm"); PlayerInfo[playerid][Nopm] = strval(savingstring); } mysql_free_result(); JustLogged[playerid] = 1; Logged[playerid] = 1; SendClientMessage(playerid,red,"------------------------------------------------------"); new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); new string[128]; format(string,sizeof(string),"* System: Welcome back {F70505}%s (%d) {FFFFFF} - Your stats have been restored.",playername3,playerid); SCM(playerid,-1,string); SendClientMessage(playerid,red,"------------------------------------------------------"); CheckVipTime(playerid); return 1; }