31.05.2015, 14:12
(
Last edited by MotherDucker; 31/05/2015 at 03:23 PM.
)
I got a problem with the script where when you login, with the correct password; it logs the error
When there is a row with the correct values etc.
If you can, could you point out the issue, if there is one that is :L
Code:
[15:01:45] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('3')
If you can, could you point out the issue, if there is one that is :L
Code:
case DIALOG_LOGIN: { if(!response) return Kick(playerid); else { mysql_format(sql, query, sizeof(query), "SELECT * FROM masterdata WHERE uName = '%e' AND uPass = MD5('%e')", MasterData[playerid][uName], inputtext); mysql_tquery(sql, query, "OnPlayerAccountLogin", "i", playerid); } }
Code:
forward OnPlayerAccountLogin(playerid); public OnPlayerAccountLogin(playerid) { cache_get_data(rows, fields); if(rows > 0) { /*format(query, sizeof(query), "UPDATE master_data SET LastIP = '%s' WHERE Username = '%s'", PlayerIP(playerid), MasterData[playerid][uName]); mysql_query(query);*/ cache_get_row(rows, 3, query); if(strfind(query, "")) return query = "Create Character"; MasterData[playerid][Char0] = query; cache_get_row(rows, 4, query); if(strfind(query, "")) return query = "Create Character"; MasterData[playerid][Char1] = query; cache_get_row(rows, 5, query); if(strfind(query, "")) return query = "Create Character"; MasterData[playerid][Char2] = query; //format(msg, sizeof(msg), "Welcome back %s.\nYour stats have been loaded succesfully.\nThe last login for this account was from IP: %s", PlayerName(playerid), Player_Data[playerid][Last_IP]); format(str, sizeof(str), "%s\n%s\n%s\n \nAccount Settings", MasterData[playerid][Char0], MasterData[playerid][Char1], MasterData[playerid][Char2]); ShowPlayerDialog(playerid, DIALOG_CHARSELECT, DIALOG_STYLE_LIST, "Duck's Roleplay - Account", str, "Select", "Quit"); } }