Pawno Warning !
#1

Hey , I get this warning :
Код:
C:\Documents and Settings\nearCry\Desktop\ASTA\gamemodes\RNSGM.pwn(13051) : warning 206: redundant test: constant expression is non-zero
At the line :
Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448, 461, 462, 463, 468, 521, 522)
Why ? THX :*
Reply
#2

incorrect or unneeded parameters
aint it meant to be |

pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 448 | 461 | 462 | 463 | 468 | 521 | 522)
Reply
#3

Still wrong;
pawn Код:
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 448 || model == 461 || model == 462 || /* you get the point */) {}
Or use switch;

pawn Код:
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
    case 448, 461, 462, 463, 468, 521, 522: {}
}
Reply
#4

Thx , it work's :X
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)