[Question] How i fix this/
#1

warning 206: redundant test: constant expression is non-zero
this happents on this line: if(tmp, OpenA, true)
Reply
#2

Код:
redundant test: constant expression is non-zero

Where a conditional expression was expected, a constant expression
with a non-zero value was found, e.g. if (1). The test is
redundant, because the conditional code is always executed.
To create an endless loop, use for ( ;; ) instead of while (1).
Copied from the pawn-lang.pdf.

Meaning your if operator is useless, it will always be executed.
Reply
#3

so , how i can fix this? xd
Reply
#4

What should that code do?
Reply
#5

Well it's a chat actvity, there is a question, first one who answer correct, win.

tmp = strtok(cmdtext, idx);
OpenPA[playerid] = strval(tmp);
SCM(playerid, GREEN, "You have send your answer.");
if(tmp, OpenA, true)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if( i != playerid)
{
if(OpenPA[i], OpenA, true)
{
OpenPA[playerid] = 999;
}
else OpenPA[i] = 999;
}
}
}
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)