[Ajuda] redundant test: constant expression is non-zero
#1

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...
Reply
#2

qual a linha do erro '-'
Reply


Forum Jump:


Users browsing this thread: