20.02.2014, 17:21
Okay, so the whole script works thus far, besides updating the player info.. I've tried reading through the previous comments and haven't noticed anything unusual in my code... anyone got any idea as to why this doesn't update?
I inserted :
To try and debug the ID that's being sent, but in the console, it's just sending Symbols? (i.e. smiley face, diamond, hearts, etc...)
Code:
public SaveAccount(playerid) { new qString[128], Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); mysql_format(mysql, qString, sizeof(qString), "UPDATE `paccounts` SET `Level`=%d, `Money`=%d, `Health`=%f, `Armour`=%f, `Admin`=%d, `Helper`=%d, `posX`=%f, `posY`=%f, `posZ`=%f WHERE `ID`=%d",\ pInfo[playerid][pLevel], pInfo[playerid][pMoney], pInfo[playerid][pHealth], pInfo[playerid][pArmour], pInfo[playerid][pAdmin], pInfo[playerid][pHelper], pos[0], pos[1], pos[2], pInfo[playerid][ID]); print(pInfo[playerid][ID]); mysql_tquery(mysql, qString, "", ""); } public OnPlayerDisconnect(playerid, reason) { SaveAccount(playerid); return 1; } public OnAccountCreate(playerid) { pInfo[playerid][ID] = cache_insert_id(); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Login Panel", "Thank you for registering!\nAn account has been found in our files;\nIn order to access the server however, you must first login: ", "Login", "Quit"); return 1; }
I inserted :
Code:
print(pInfo[playerid][ID]);