Params and redundant test: constant expression is non-zero
#6

Quote:
Originally Posted by BigETI
Посмотреть сообщение
The first problem can be solved using
pawn Код:
#if USE_TEXTDRAW_SET == 2 // Your "if"
// Your if code
#elseif SOMETHING > 0 // alternative "else" and "if" (an example, if you are going to use something like this)
// ...
#else // alternative else (an example, if you are going to use something like this)
// ...
#endif // End of your "if"
To the second thing, I wouldn't use this method for searching commands in a script.
you mean when im using the "#if USE_TESTDRAW_SET == 2" in the end of strcmp i have to add #endif and it wouldn't give an warning? if so :

If i change "if(USE_TEXTDRAW_SET == 2)" to "#if USE_TEXTDRAW_SET == 2"
It would give me an error.
Код:
error 001: expected token: "#endif", but found "-end of file-"
then i added endif and it gave me another error :
Код:
(29312) : error 029: invalid expression, assumed zero
Line 29312
Код:
       else
Код:
        #if USE_TEXTDRAW_SET == 2
        {
            format(string,sizeof(string),"Listening to: ~n~~w~%s",r_RadioInfo[playingid][r_Name]);
            TextDrawSetString(v_VehicleInfo[vehicleid][r_Draw],string);
        }
        else // the error says this invalid expression, assumed zero
        {
            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);
        }
	#endif
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)