If error
#1

Код:
if(GetPlayerSkin(playerid) != 71, 282, 288, 283)
Why its wrong?
warning 206: redundant test: constant expression is non-zero
Reply
#2

"If" can only be used to check one value, not 4 different ones at the same time.
Try this:
pawn Код:
if((GetPlayerSkin(playerid) != 71) && (GetPlayerSkin(playerid) != 282) && (GetPlayerSkin(playerid) != 288) && (GetPlayerSkin(playerid) !=  283))
Or use a switch case:
pawn Код:
switch(GetPlayerSkin(playerid))
{
    case 71, 282, 288, 283:
    {
        // The skin is either 71, 282, 288 or 283
    }
    default:
    {
        // The skin is anything other than 71, 282, 288 or 283
    }
}
Reply
#3

else:

pawn Код:
if(GetPlayerSkin(playerid) != 71 && GetPlayerSkin(playerid) != 282 && GetPlayerSkin(playerid) != 283 && GetPlayerSkin(playerid) != 288)
    {
        // something
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)