Y_Ini wont save Users stats
#6

pawn Код:
public LoadUser_data(playerid, name[], value[])
{
    if(!strcmp(name, "Password"))   strmid(PlayerInfo[playerid][pPass], value, 0, 128);
    if(!strcmp(name, "Cash"))       PlayerInfo[playerid][pCash] = strval(value);
    // Rest of your data to load.
}
DIALOG_LOGIN:
pawn Код:
INI_ParseFile(UserPath(playerid), "LoadUser_Data", .bExtra = true, .extra = playerid);
First of all, you had password loading set as INT, where password is a STRING, not an integer. I think that should load your data back in game.

edit://
You mentioned it doesn't save. Does it actually load? I will check your saving procedure.

When user registers, you have to change that:
pawn Код:
INI_WriteInt(File,"Password",udb_hash(inputtext));
To that:
pawn Код:
INI_WriteString(File, "Password", udb_hash(inputtext));
Also, the file you are creating is getting the name of the user's ID. Which means it can be overwritten. Instead of that, use the user name to create the file in your directory.
Reply


Messages In This Thread
Y_Ini wont save Users stats - by ohmy - 13.11.2014, 06:10
Re: Y_Ini wont save Users stats - by Banana_Ghost - 13.11.2014, 06:34
Re: Y_Ini wont save Users stats - by ohmy - 13.11.2014, 10:15
Re: Y_Ini wont save Users stats - by Quickie - 13.11.2014, 10:29
Re: Y_Ini wont save Users stats - by ohmy - 13.11.2014, 11:24
Re: Y_Ini wont save Users stats - by Riddick94 - 13.11.2014, 11:30
Re: Y_Ini wont save Users stats - by ohmy - 13.11.2014, 23:49
Re: Y_Ini wont save Users stats - by ohmy - 15.11.2014, 08:57

Forum Jump:


Users browsing this thread: 1 Guest(s)