Ini files not being written
#8

Код:
#define USER_PATH "/Users/%s.ini"
Код:
UserPath(playerid){

    // Declare our variables used in this function
    new
        str[36], // 'str' will be our variable used to format a string, the size of that string will never exceed 36 characters.
        name[MAX_PLAYER_NAME]; // 'name' will be our variable used to store the player's name in the scope of this function. MAX_PLAYER_NAME is defined as 24.

    // Get the player's name.
    GetPlayerName(playerid, name, sizeof(name));

    // Format USER_PATH with the name that we got with GetPlayerName.
    format(str, sizeof(str), USER_PATH, name); // USER_PATH has been defined as: "/Users/%s.ini", %s will be replaced the player's name.
    return str;
}
Код:
new INI:file = INI_Open(UserPath(playerid));
                INI_SetTag(file, "PlayerData");
                INI_WriteString(file, "Password", PlayerInfo[playerid][Password]);
                INI_Close(file);
Reply


Messages In This Thread
Ini files not being written - by matje - 11.02.2018, 15:30
Re: Ini files not being written - by matje - 11.02.2018, 15:34
Re: Ini files not being written - by iKarim - 11.02.2018, 15:35
Re: Ini files not being written - by matje - 11.02.2018, 15:37
Re: Ini files not being written - by iKarim - 11.02.2018, 15:39
Re: Ini files not being written - by matje - 11.02.2018, 15:59
Re: Ini files not being written - by iKarim - 11.02.2018, 16:10
Re: Ini files not being written - by matje - 11.02.2018, 16:19
Re: Ini files not being written - by iKarim - 11.02.2018, 16:23
Re: Ini files not being written - by matje - 11.02.2018, 16:32

Forum Jump:


Users browsing this thread: 1 Guest(s)