15.05.2011, 17:11
Hello
I've made a stock that worked perfectly untill I made another stock (that has nothing to do with this one).
I get those warnings (which I have never seen before,btw) when I compile:
For those lines:
(I censured the classes and teams,sorry)
I get the warnings for all lines exept arguments E and F.
Please help me
Thanks
I've made a stock that worked perfectly untill I made another stock (that has nothing to do with this one).
I get those warnings (which I have never seen before,btw) when I compile:
pawn Код:
(417) : warning 206: redundant test: constant expression is non-zero
(418) : warning 206: redundant test: constant expression is non-zero
(419) : warning 206: redundant test: constant expression is non-zero
(420) : warning 206: redundant test: constant expression is non-zero
(421) : warning 206: redundant test: constant expression is non-zero
(422) : warning 206: redundant test: constant expression is non-zero
(423) : warning 206: redundant test: constant expression is non-zero
(426) : warning 206: redundant test: constant expression is non-zero
(427) : warning 206: redundant test: constant expression is non-zero
(428) : warning 206: redundant test: constant expression is non-zero
(429) : warning 206: redundant test: constant expression is non-zero
(430) : warning 206: redundant test: constant expression is non-zero
pawn Код:
stock SetPlayerTeamFromClass(playerid,classid)
{
if (classid == X,X,X) { gTeam[playerid] = TEAM_X; }
else if (classid == Y,Y,Y,Y,Y,Y,Y,Y) { gTeam[playerid] = TEAM_Y; }
else if (classid == Z,Z,Z) { gTeam[playerid] = TEAM_Z; }
else if (classid == A,A,A,A,A,A,A,A) { gTeam[playerid] = TEAM_A; }
else if (classid == B,B,B,B) { gTeam[playerid] = TEAM_B; }
else if (classid == C,C) { gTeam[playerid] = TEAM_C; }
else if (classid == D,D,D,D,D) { gTeam[playerid] = TEAM_D; }
else if (classid == E) { gTeam[playerid] = TEAM_E; }
else if (classid == F) { gTeam[playerid] = TEAM_F; }
else if (classid == G,G,G,G,G,G,G) { gTeam[playerid] = TEAM_G; }
else if (classid == H,H,H,H,H,H) { gTeam[playerid] = TEAM_H; }
else if (classid == I,I,I) { gTeam[playerid] = TEAM_I; }
else if (classid == J,J,J) { gTeam[playerid] = TEAM_J; }
else if (classid == K,K,K) { gTeam[playerid] = TEAM_K; }
return 1;
}
I get the warnings for all lines exept arguments E and F.
Please help me
Thanks