SA-MP Forums Archive
1 warning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 1 warning (/showthread.php?tid=288874)



1 warning - Ehab1911 - 09.10.2011

pawn Код:
(30) : warning 206: redundant test: constant expression is non-zero
pawn Код:
if(!vmodelid) //LINE30
    {
        printf("Invalid modelid for vehicle %i", vehicleid);
        return -1;
    }
How can I fix it?


Re: 1 warning - iJumbo - 09.10.2011

where you use this code?


Re: 1 warning - Ehab1911 - 09.10.2011

pawn Код:
enum vInfo
{
    vmodelid,
pawn Код:
VehicleInfo[vehicleid][vmodelid] = modelid;



Re: 1 warning - aRoach - 09.10.2011

pawn Код:
if(!VehicleInfo[vehicleid][vmodelid])
{
    printf("Invalid modelid for vehicle %i", vehicleid);
    return -1;
}



Re: 1 warning - Ehab1911 - 09.10.2011

Thank you!


Re: 1 warning - aRoach - 09.10.2011

No problem...