13.08.2013, 13:09
I'm having an issue with a Y_INI string. I've basically put it so it saves an input from a dialog as a string and on another dialog box it reads that value. On the saving part it works perfectly fine but on the reading part it has an issue as it doesnt even't write the name. ( It shows nothing in return )
Here's my loading method
Saving Method ( Saves perfectly the input name into the .ini )
And here's the part which doesn't work ( It's supposed to print Your Name: Name_Surname ( Which it should read from the .ini but instead it prints just Your Name: ) )
Here's my loading method
pawn Код:
// From the enum array
CharacterName[128],
// From LoadUser Method
INI_Int("CharacterName", PlayerData[playerid][CharacterName]);
pawn Код:
format(PlayerData[playerid][CharacterName], 128, "%s",inputtext);
new INI:File = INI_Open(UserPath(playerid));
INI_WriteString(File, "CharacterName", PlayerData[playerid][CharacterName]);
INI_Close(File);
pawn Код:
new szString[128];
format(szString, sizeof(szString), "Your Character: %s", PlayerData[playerid][CharacterName]);
ShowPlayerDialog(playerid, DIALOG_LOGINCHARACTER, DIALOG_STYLE_INPUT, "Omega Roleplay", szString, "Login", "")