creating a file with yini?
#1

Hello,

I have this:

pawn Код:
if(dialogid == 1) //Register
    {
        if(response)
        {
            new name[MAX_PLAYER_NAME], files[256];
            GetPlayerName(playerid, name, sizeof(name));
            format(files, sizeof(files), "%s.ini", name);
            {
                new INI:file = INI_Open(files);
                gPlayerInfo[playerid][pPassword] = INI_WriteInt(file, "Password", udb_hash(inputtext));
                gPlayerInfo[playerid][pLevel] = INI_WriteInt(file, "Level", 1);
                SetPlayerScore(playerid,1);
                gPlayerInfo[playerid][pMoney] = INI_WriteInt(file, "Money", 5000);
                GivePlayerMoney(playerid,5000);
                gPlayerInfo[playerid][pHealth] = INI_WriteInt(file, "Health", 100);
                SetPlayerHealth(playerid,100);
                gPlayerInfo[playerid][pArmour] = INI_WriteInt(file, "Armour", 0);
                SetPlayerArmour(playerid,0);
                gPlayerInfo[playerid][pSkin] = INI_WriteInt(file, "Skin", 26);
                SetPlayerSkin(playerid,26);
                INI_Close(file);
                gPlayerLogged[playerid] = 1;
                return 1;
            }
        }
    }
But when I go to scriptfiles the file is not there, for example I join as John_Testy and it doesnt create a new .ini file called "John_Testy.ini"

Please help im using yini
Reply


Messages In This Thread
creating a file with yini? - by Tommy_Mandaz - 18.04.2011, 14:30
Re: creating a file with yini? - by Sascha - 18.04.2011, 14:46
Re: creating a file with yini? - by Tommy_Mandaz - 18.04.2011, 14:52
Re: creating a file with yini? - by Tommy_Mandaz - 18.04.2011, 15:32
Re: creating a file with yini? - by Sascha - 18.04.2011, 17:22

Forum Jump:


Users browsing this thread: 2 Guest(s)