warning 206: redundant test: constant expression is non-zero
#1

Код:
warning 206: redundant test: constant expression is non-zero
Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
        {
        new vehicleid = GetPlayerVehicleID(playerid),
        playingid = v_VehicleInfo[vehicleid][RadioPlaying];
        if(USE_TEXTDRAW_SET == 2) <-----------  warning 206: redundant test: constant expression is non-zero
            {
            format(string,sizeof(string),"Listening to: ~n~~w~%s",r_RadioInfo[playingid][r_Name]);
            TextDrawSetString(v_VehicleInfo[vehicleid][r_Draw],string);
            }
        else
            {
            TextDrawSetString(v_VehicleInfo[vehicleid][r_Draw],r_RadioInfo[playingid][r_Name]);
            }
        TextDrawShowForPlayer(playerid,v_VehicleInfo[vehicleid][r_Draw]);
        SetPVarInt(playerid,"ID_HideRadioTextdraw",SetTimerEx("HideRadioTextdraw",TEXTDRAW_DISAPPEAR_TIME,false,"ii",playerid,vehicleid));
        PlayAudioStreamForPlayer(playerid,r_RadioInfo[playingid][r_Link]);
        SetPVarInt(playerid,"ID_OldVehicle",vehicleid);
        }
    	if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
        {
        new vehicleid = GetPVarInt(playerid,"ID_OldVehicle"),
            timer = GetPVarInt(playerid,"ID_HideRadioTextdraw");
        if(timer != -1)
            {
            TextDrawHideForPlayer(playerid,v_VehicleInfo[vehicleid][r_Draw]);
            KillTimer(timer);
            }
        StopAudioStreamForPlayer(playerid);
    }
Reply
#2

Please show the line!
Reply
#3

Quote:
Originally Posted by HardRock
Посмотреть сообщение
Код:
warning 206: redundant test: constant expression is non-zero
Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
        {
        new vehicleid = GetPlayerVehicleID(playerid),
        playingid = v_VehicleInfo[vehicleid][RadioPlaying];
        if(USE_TEXTDRAW_SET == 2) <-----------  warning 206: redundant test: constant expression is non-zero
            {
            format(string,sizeof(string),"Listening to: ~n~~w~%s",r_RadioInfo[playingid][r_Name]);
            TextDrawSetString(v_VehicleInfo[vehicleid][r_Draw],string);
            }
        else
            {
            TextDrawSetString(v_VehicleInfo[vehicleid][r_Draw],r_RadioInfo[playingid][r_Name]);
            }
        TextDrawShowForPlayer(playerid,v_VehicleInfo[vehicleid][r_Draw]);
        SetPVarInt(playerid,"ID_HideRadioTextdraw",SetTimerEx("HideRadioTextdraw",TEXTDRAW_DISAPPEAR_TIME,false,"ii",playerid,vehicleid));
        PlayAudioStreamForPlayer(playerid,r_RadioInfo[playingid][r_Link]);
        SetPVarInt(playerid,"ID_OldVehicle",vehicleid);
        }
    	if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
        {
        new vehicleid = GetPVarInt(playerid,"ID_OldVehicle"),
            timer = GetPVarInt(playerid,"ID_HideRadioTextdraw");
        if(timer != -1)
            {
            TextDrawHideForPlayer(playerid,v_VehicleInfo[vehicleid][r_Draw]);
            KillTimer(timer);
            }
        StopAudioStreamForPlayer(playerid);
    }
if(USE_TEXTDRAW_SET == 2) <----------- warning 206: redundant test: constant expression is non-zero
Reply
#4

Did you defined it?
Reply
#5

Yeh

Код:
#define USE_TEXTDRAW_SET 2
Reply
#6

MAte here is answer CLICK ME
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)