[Ajuda] redundant test: constant expression is non-zero - 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] redundant test: constant expression is non-zero (
/showthread.php?tid=411329)
redundant test: constant expression is non-zero -
Falcon. - 28.01.2013
pawn Код:
#include "a_samp.inc"
new string[100];
new something01[][] = { "01 - go to: %s" };
new something02[][] = { "02 - go to: %s" };
#define MyFunction(%0,%1,%2,%3) format(string, sizeof string, %1 == 1 ? something01[%2] : something02[%2], %3);\
printf("debug_%i - %s", %0, string)
main()
{
MyFunction(0, 1, 0, "sa-mp forums");
}
sem o operador ternбrio compila sem avisos, com ela retorna:
"redundant test: constant expression is non-zero".
Olhei alguns tуpicos mas o aviso resultava em outros exemplos de cуdigo, entгo nгo consegui entender bem o motivo...
Re: redundant test: constant expression is non-zero -
XStylerX - 28.01.2013
qual a linha do erro '-'