sscanf bug?
#2

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;
}
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)