Weird output.
#1

Hi.
So, I've this code:
pawn Код:
g_Stats[gameid][gDuring] = true;
    nb_player[3] = g_Stats[gameid][gOwner] = playerid;
    //g_Stats[gameid][gMember] = nb_player;
    for(new i; i < MAX_PLAYER_PER_GAME; i++)
    {
        SCMF(playerid, RED, "%i & %i (i: %i)", g_Stats[gameid][gMember][i], nb_player[i], i);
        g_Stats[gameid][gMember][i] = nb_player[i];
        SCMF(playerid, RED, "%i & %i \n", g_Stats[gameid][gMember][i], nb_player[i]);
    }
    g_Stats[gameid][gGame] = gameid;
    p_Stats[playerid][pAccepted] = true;

    SCMF(playerid, -1, "%i & %i & %i & %i", nb_player[0], nb_player[1], nb_player[2], nb_player[3]);
    SCMTAE(RED,"» %i & %i & %i & %i", g_Stats[gameid][gMember][0], g_Stats[gameid][gMember][1], g_Stats[gameid][gMember][2], g_Stats[gameid][gMember][3]);
A lot of debug because this make no sence. There is the output:
Код:
[11:48:55] 1 & 1 (i: 0)
[11:48:55] 1 & 1  
[11:48:55] 0 & 2 (i: 1)
[11:48:55] 2 & 2  
[11:48:55] 4 & 3 (i: 2)
[11:48:55] 3 & 3  
[11:48:55] 0 & 4 (i: 3)
[11:48:55] 4 & 4  
[11:48:55] 1 & 2 & 3 & 4
[11:48:55] » 1 & 0 & 3 & 4
One value is changing by himself, plus some are aleady attributates to g_Stats[gameid][gMember] which is not possible. It's should be 0 everywhere.

Edit : SCMF = SendClientMessageFormatted & SCMTAE = SendClientMessageToAllEx
Reply


Messages In This Thread
Weird output. - by Dayrion - 28.12.2016, 09:56
Re: Weird output. - by RoboN1X - 28.12.2016, 10:44
Re: Weird output. - by SyS - 28.12.2016, 10:50
Re: Weird output. - by Dayrion - 28.12.2016, 11:24
Re: Weird output. - by RoboN1X - 28.12.2016, 12:36
Re: Weird output. - by Dayrion - 28.12.2016, 13:43

Forum Jump:


Users browsing this thread: 1 Guest(s)