// From the enum array
CharacterName[128],
// From LoadUser Method
INI_Int("CharacterName", PlayerData[playerid][CharacterName]);
format(PlayerData[playerid][CharacterName], 128, "%s",inputtext);
new INI:File = INI_Open(UserPath(playerid));
INI_WriteString(File, "CharacterName", PlayerData[playerid][CharacterName]);
INI_Close(File);
new szString[128];
format(szString, sizeof(szString), "Your Character: %s", PlayerData[playerid][CharacterName]);
ShowPlayerDialog(playerid, DIALOG_LOGINCHARACTER, DIALOG_STYLE_INPUT, "Omega Roleplay", szString, "Login", "")
what if you make a stock called getplayername
it would be easy and better use wikis -_- |
INI_Int("CharacterName", PlayerData[playerid][CharacterName]);
INI_String("CharacterName", PlayerData[playerid][CharacterName], sizeof(PlayerData[playerid][CharacterName]));
INI_String("CharacterName", PlayerData[playerid][CharacterName], 128);
C:\Users\Administrator\Desktop\sampl0l0l0p\gamemodes\OmegaRoleplay.pwn(225) : error 001: expected token: "]", but found "-identifier-"
C:\Users\Administrator\Desktop\sampl0l0l0p\gamemodes\OmegaRoleplay.pwn(225) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\sampl0l0l0p\gamemodes\OmegaRoleplay.pwn(225) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\sampl0l0l0p\gamemodes\OmegaRoleplay.pwn(225) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\sampl0l0l0p\gamemodes\OmegaRoleplay.pwn(225) : fatal error 107: too many error messages on one line
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password", PlayerData[playerid][Password]);
INI_Int("Health", PlayerData[playerid][Health]);
INI_Int("Skin", PlayerData[playerid][Skin]);
INI_Int("Armour", PlayerData[playerid][Armour]);
INI_Int("TutorialCompleted", PlayerData[playerid][TutorialCompleted]);
INI_Int("InTutorial", PlayerData[playerid][InTutorial]);
INI_Int("PosX", PlayerData[playerid][PosX]);
INI_Int("PosY", PlayerData[playerid][PosY]);
INI_Int("PosZ", PlayerData[playerid][PosZ]);
//INI_Int("Registered", PlayerData[playerid][Registered]);
INI_Int("IsLogged", PlayerData[playerid][IsLogged]);
INI_Int("AdministratorLevel", PlayerData[playerid][AdministratorLevel]);
INI_Int("ModeratorLevel", PlayerData[playerid][ModeratorLevel]);
INI_Int("Helper", PlayerData[playerid][Helper]);
INI_Int("DonatorLevel", PlayerData[playerid][DonatorLevel]);
INI_Int("WeaponA", PlayerData[playerid][WeaponA]);
INI_Int("WeaponB", PlayerData[playerid][WeaponB]);
INI_String("CharacterName", PlayerData[playerid][CharacterName], sizeof(PlayerData[playerid][CharacterName]));
INI_Int("Cash", PlayerData[playerid][Cash]);
INI_Int("Gender", PlayerData[playerid][Gender]);
INI_Int("Age", PlayerData[playerid][Age]);
INI_Int("Username", PlayerData[playerid][Username]);
return 1;
}