[Ajuda] Sscanf2
#1

Eu estou fazendo o /gov, só que está dando um esse erro: sscanf warning: String buffer overflow. As string estão com 128b já, mas n adianta...

PHP код:
new texto[128], aa[128], arquivo[60], nome[MAX_PLAYER_NAME];
    if(
sscanf(params"s"texto)) return SendClientMessage(playeridCOR_ERRO"/gov [TEXTO]");
    
format(aasizeof(aa), "%s"texto);
    
SendClientMessageToAll(Branco"||____________ NOTÍCIAS DO GOVERNO _______________||");
    
SendClientMessageToAll(COR_AZULaa);
    
SendClientMessageToAll(Branco"___________________________________________________"); 
Se alguém souber como arrumar isso me fal por favor...


@EDIT: já consegui consertar, eu adc a stock do sscanf direto no GM.
Reply
#2

pawn Код:
new texto[128], aa[128], arquivo[60], nome[MAX_PLAYER_NAME];
    if(sscanf(params, "s[128]", texto)) return SendClientMessage(playerid, COR_ERRO, "/gov [TEXTO]");
    format(aa, sizeof(aa), "%s", texto);
    SendClientMessageToAll(Branco, "||____________ NOTНCIAS DO GOVERNO _______________||");
    SendClientMessageToAll(COR_AZUL, aa);
    SendClientMessageToAll(Branco, "___________________________________________________");

nгo faзa assim:
pawn Код:
if(sscanf(params, "s", texto))
faзa assim:
pawn Код:
if(sscanf(params, "s[128]", texto))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)