redundant test: constant expression is non-zero
#2

You cannot compare like that. You would've to check if the carid is N everytime BUT.. switch is faster:
pawn Код:
stock IsAMotorcycle(carid)
{
    switch (carid)
    {
        case 448, 461 .. 463, 468, 471, 521 .. 523, 581, 586: return 1;
    }
    return 0;
}
Make sure that when you use that function, you use GetVehicleModel.
pawn Код:
if (IsAMotorcycle(GetVehicleModel(vehicleid))) ...
Reply


Messages In This Thread
redundant test: constant expression is non-zero - by Blademaster680 - 16.01.2014, 15:23
Re: redundant test: constant expression is non-zero - by Konstantinos - 16.01.2014, 15:27
Re: redundant test: constant expression is non-zero - by Blademaster680 - 16.01.2014, 15:39
Re: redundant test: constant expression is non-zero - by iZN - 16.01.2014, 15:41
Re: redundant test: constant expression is non-zero - by Konstantinos - 16.01.2014, 15:43
Re: redundant test: constant expression is non-zero - by Blademaster680 - 16.01.2014, 15:45

Forum Jump:


Users browsing this thread: 1 Guest(s)