Y_ini Savin' Problem
#1

The file dosnt get created... (Unknown123.ini)
Why not?

pawn Код:
#define FILE_FOLDER "Accounts/%s.ini"

dcmd_register(playerid, params[])
{
    new password[128];
    if(sscanf(params, "s[128]", password)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /register (password)");
    {
        new PlayerFile[256];

        format(PlayerFile, sizeof PlayerFile, FILE_FOLDER, Encode(PlayerName(playerid)));

        new INI:PlayerAccount = INI_Open(PlayerFile);
        INI_WriteString(PlayerAccount, "Name", PlayerName(playerid));
        INI_WriteString(PlayerAccount, "Password", password);
        INI_WriteString(PlayerAccount, "PlayerIP", PlayerIP(playerid));
        INI_WriteInt(PlayerAccount, "AdminLevel", 0);
        INI_WriteInt(PlayerAccount, "Score", 0);
        INI_WriteInt(PlayerAccount, "Money", 0);
        INI_WriteInt(PlayerAccount, "Kills", 0);
        INI_WriteInt(PlayerAccount, "Deaths", 0);
        INI_Close(PlayerAccount);
       
        SendClientMessage(playerid, 0xFF0000FF, "Registred!");
        return 1;
    }
}
Reply


Messages In This Thread
Y_ini Savin' Problem - by Unknown123 - 18.03.2011, 11:30
Re: Y_ini Savin' Problem - by HyperZ - 18.03.2011, 11:52
Re: Y_ini Savin' Problem - by Unknown123 - 18.03.2011, 11:55
Re: Y_ini Savin' Problem - by HyperZ - 18.03.2011, 11:58
Re: Y_ini Savin' Problem - by Unknown123 - 18.03.2011, 11:59
Re: Y_ini Savin' Problem - by HyperZ - 18.03.2011, 12:00
Re: Y_ini Savin' Problem - by Unknown123 - 18.03.2011, 12:38

Forum Jump:


Users browsing this thread: 1 Guest(s)