Y_INI is not working properly [No warnings]
#1

Hello lads!

I'm learing how to use Y_INI but I couldn't make it work (It loads the password,playerDeaths,Cash,Admin,PlayerKills,Money )

Not working:
*WantedLevel
*Score

Enum:

PHP Code:
enum pInfo
{
    
pPass,
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths,
    
pWantedLevel,
    
pScore
}
new 
PlayerInfo[MAX_PLAYERS][pInfo]; 
OnPlayerDisconnect:

PHP Code:
    ///Y_INI
    
new INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_WriteInt(File,"WantedLevel",SavedWantedLevel[playerid]);
    
INI_WriteInt(File,"Score",GetPlayerScore(playerid));
    
INI_Close(File); 
Load User_Data

PHP Code:
public LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_Int("WantedLevel",PlayerInfo[playerid][pWantedLevel]);
    
INI_Int("Score",PlayerInfo[playerid][pWantedLevel]);
    return 
1;

It does create all the lines in the PlayerName.ini file but the score & wantedlevel is not loading.

Thanks in advance
Reply


Messages In This Thread
Y_INI is not working properly [No warnings] - by [CG]Milito - 22.12.2012, 23:41
Re: Y_INI is not working properly [No warnings] - by JaKe Elite - 23.12.2012, 00:04
Respuesta: Re: Y_INI is not working properly [No warnings] - by [CG]Milito - 23.12.2012, 00:18

Forum Jump:


Users browsing this thread: 2 Guest(s)