Y_Ini wont save Users stats
#1

why my Gamemode wont save users stats, and not created the .ini files. can you tell me why??
Reply
#2

Post all of your code regarding y_ini. Pastebin it please.
Reply
#3

Quote:
Originally Posted by Banana_Ghost
Посмотреть сообщение
Post all of your code regarding y_ini. Pastebin it please.
http://pastebin.com/aphw9HXF
Reply
#4

try this one
pawn Код:
#define PATH "Users/%s.ini"
//or
#define PATH "Users\%s.ini"
Reply
#5

I Try that two but not working
Reply
#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
#7

Can you pastebin the all of the script?

EDIT: i mean if you register, and you relog it will back to register again, and the INI not create the users
Reply
#8

im still need help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)