Y_INI not overwriting data..
#1

pawn Код:
// .ini file
[Server Statistics]
Total Registered Users = 1
Total Registered Users = 1
pawn Код:
new gTotalRegisters;
#define ServerStats "stats/ServerStats.ini"
//OnGameModeInit
INI_ParseFile(ServerStats, "loadserverstats", .bExtra = false);

forward loadserverstats(name[], value[]);
public loadserverstats(name[], value[])
{
    INI_Int("Total Registered Users", gTotalRegisters);
    return 1;
}

// DIALOG_REGISTER
gTotalRegisters++;
format(str, sizeof(str), "{%06x}%s(%d) has registered, making the server have total %d players registered.", random_color >>> 8, GetName(playerid), playerid, gTotalRegisters);
SendClientMessageToAll(-1, str);

new INI:FILE_SERVER_STATS = INI_Open(ServerStats);
INI_SetTag(FILE_SERVER_STATS, "Server Statistics");
INI_WriteInt(FILE_SERVER_STATS, "Total Registered Users", gTotalRegisters);
INI_Close(FILE_SERVER_STATS);
Help..
Reply


Messages In This Thread
Y_INI not overwriting data.. - by SyntaxQ - 13.03.2014, 12:56
Re: Y_INI not overwriting data.. - by SyntaxQ - 13.03.2014, 14:26
Re: Y_INI not overwriting data.. - by Chrillzen - 13.03.2014, 14:39
Re: Y_INI not overwriting data.. - by BroZeus - 13.03.2014, 14:53

Forum Jump:


Users browsing this thread: 2 Guest(s)