sscanf bug?
#1

pawn Код:
command(lotto, playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new nr;
        if(sscanf(params, "i", nr)) return SendClientUsage(playerid, "USAGE: /lotto nr");
        playerVariables[playerid][pLotteryTicket] = nr;
        SendClientMessage(playerid,-1,sprintf("NR:%d",playerVariables[playerid][pLotteryTicket]));
        return 1;
    }
    return 1;
}
command(test3, playerid, params[])
{
    #pragma unused params
    if(IsPlayerConnected(playerid))
    {
        foreach(new i : Player) {
            SendClientMessage(playerid,-1,sprintf("ID %d has NR:%d",i, playerVariables[i][pLotteryTicket]));
        }
    }
    return 1;
}
I have those 2 commands, when I use the /lotto command and I set my number for example to 13, the other player has the same number as me. Is this a bug?

@cookiemonster: You didn't edited anything.
Reply


Messages In This Thread
sscanf bug? - by fordawinzz - 13.09.2012, 22:12
Re: sscanf bug? - by C00K13M0N$73R - 13.09.2012, 22:14

Forum Jump:


Users browsing this thread: 1 Guest(s)