Register System not creating file.
#1

I'm trying to have this register system create a file when the player registers, so it will save their stats.

pawn Код:
if(!strlen(inputtext))
                {
                    ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.\nPlease enter the password!","Register","Quit");
                    return 1;
                }
                new hashpass[129];
                WP_Hash(hashpass,sizeof(hashpass),inputtext);
                new INI:file = INI_Open(UserPath(playerid));
                INI_SetTag(file,"Player's Data");
                INI_WriteString(file,"Password",hashpass);
                INI_WriteInt(file,"AdminLevel",0);
                INI_WriteInt(file,"VIP",0);
                INI_WriteInt(file,"Money",0);
                INI_WriteInt(file,"Score",0);
                INI_WriteInt(file,"Kills",0);
                INI_WriteInt(file,"Deaths",0);
                INI_Close(file);
                SendClientMessage(playerid,-1,"You have been successfully registered");
I'm not too sure what I'm doing wrong.

Other info you might need:
pawn Код:
#define PATH "/Users/%s.ini"
pawn Код:
stock UserPath(playerid) // Stock function, for the register system
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
Reply


Messages In This Thread
Register System not creating file. - by rangerxxll - 05.03.2013, 19:53
Re: Register System not creating file. - by Vince - 05.03.2013, 20:03
Re: Register System not creating file. - by rangerxxll - 05.03.2013, 20:05
Re: Register System not creating file. - by Vince - 05.03.2013, 20:07
Re: Register System not creating file. - by rangerxxll - 05.03.2013, 20:09

Forum Jump:


Users browsing this thread: 1 Guest(s)