Saving problem (DINI)
#7

That code looks good to me, the only thing that come to my mind is; "gPlayerLogged[a]" may be zero for some reason. (i know thats unlikely but...)

Try putting some prints in there to see what gets executed and display some data.
EG,
pawn Код:
for(new a; a < MAX_PLAYERS; a++)
{
    if(!IsPlayerConnected(a))continue;
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(a, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    if(gPlayerLogged[a] == 1)
    {
        dini_IntSet(file, "Score", PlayerInfo[a][pScore]);
        dini_IntSet(file, "Money", PlayerInfo[a][pCash]);
        dini_IntSet(file, "Kicks", PlayerInfo[a][pKicks]);
        dini_IntSet(file, "Bans", PlayerInfo[a][pBans]);
        dini_IntSet(file, "Kills", PlayerInfo[a][pKills]);
        dini_IntSet(file, "Deaths", PlayerInfo[a][pDeaths]);
        dini_IntSet(file, "AdminLevel",PlayerInfo[a][pAdminLevel]);
        printf("Player (id: %d) %s: stats saved to filepath: %s.\n", a, name, file);
    }
    gPlayerLogged[a] = 0;
}
Reply


Messages In This Thread
Saving problem (DINI) - by Jack Shred - 22.08.2011, 15:58
Re: Saving problem (DINI) - by Dragony92 - 22.08.2011, 16:11
Re: Saving problem (DINI) - by Jack Shred - 22.08.2011, 16:54
Re: Saving problem (DINI) - by Dragony92 - 22.08.2011, 16:55
Re: Saving problem (DINI) - by iggy1 - 22.08.2011, 16:58
Re: Saving problem (DINI) - by Jack Shred - 22.08.2011, 17:03
Re: Saving problem (DINI) - by iggy1 - 22.08.2011, 17:19
Re: Saving problem (DINI) - by Tee - 22.08.2011, 17:21
Re: Saving problem (DINI) - by iggy1 - 22.08.2011, 17:25
Re: Saving problem (DINI) - by Tee - 22.08.2011, 17:28

Forum Jump:


Users browsing this thread: 2 Guest(s)