[HELP]Y_ini problem
#1

The problem is simple

pawn Код:
enum pInfo
{
    pHouseid
}

new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Houseid,",PlayerInfo[playerid][pHouseid]);
}
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
 
    }
    return 1;
}
pawn Код:
YCMD:save(playerid, params[], help)
{
    #pragma unused params
    #pragma unused help
    new INI:File = INI_Open(UserPath(playerid));
        INI_WriteInt(File, "Houseid", 1);
        INI_Close(File);
}
pawn Код:
YCMD:myhouse(playerid, params[], help)
{
    #pragma unused params
    #pragma unused help
    new string [128];
    format(string, sizeof(string), "%i", PlayerInfo[playerid][pHouseid]);
    return SendClientMessage(playerid, -1, string);
}
when I write /save the ini file write houseid = 1 but when i want to read the integer with the command myhouse it sends me 0 all time... whats wrong?

Im confused at all

Thanks
Reply


Messages In This Thread
[HELP]Y_ini problem - by chusothe41 - 23.07.2014, 17:34
Re: [HELP]Y_ini problem - by AMouldyLemon - 23.07.2014, 17:39
Respuesta: Re: [HELP]Y_ini problem - by chusothe41 - 23.07.2014, 17:46
Re: [HELP]Y_ini problem - by LivingLikeYouDo - 23.07.2014, 18:08
Respuesta: Re: [HELP]Y_ini problem - by chusothe41 - 23.07.2014, 18:34
Respuesta: [HELP]Y_ini problem - by chusothe41 - 23.07.2014, 18:41

Forum Jump:


Users browsing this thread: 2 Guest(s)