[Ajuda] Sscanf2 - 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] Sscanf2 (
/showthread.php?tid=354870)
[Ajuda] Sscanf2 -
UkTaKe - 28.06.2012
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(playerid, COR_ERRO, "/gov [TEXTO]");
format(aa, sizeof(aa), "%s", texto);
SendClientMessageToAll(Branco, "||____________ NOTÍCIAS DO GOVERNO _______________||");
SendClientMessageToAll(COR_AZUL, aa);
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.
Re: [Ajuda] Sscanf2 -
Crueliz0n - 28.06.2012
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))