SA-MP Forums Archive
[Ajuda] Ajuda sscanf - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda sscanf (/showthread.php?tid=424131)



Ajuda sscanf - Delete_ - 20.03.2013

Log tб aparecendo isso:

sscanf warning: Strings without a length are deprecated, please add a destination size.

Quando executo comandos como: /a /relatorio /report... apenas comandos com parametros em string. Exemplo de comando com aviso da sscanf:

pawn Код:
CMD:a(playerid, params[])
{
    new TextoA[128];
    if(sscanf(params, "s", TextoA)) return SendClientMessage(playerid, BRANCO, "[LL ADMIN] Use /relatorio [texto] para mandar uma mensagem para os admins online");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if((PlayerDados[i][Admin] >= 2))
        {
            format(TextoA, sizeof(TextoA), "[ADMIN CHAT] {CDB79E}%s: {F7FFD0}%s", Nome(playerid), playerid, TextoA);
            SendClientMessage(i, 0x486CFFAA, TextoA);
        }
    }
    return 1;
}



Re: Ajuda sscanf - iReflesh - 20.03.2013

pawn Код:
if(sscanf(params, "s[128]", TextoA)) return SendClientMessage(playerid, BRANCO, "[LL ADMIN] Use /relatorio [texto] para mandar uma mensagem para os admins online");