View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-13-2017 , 11:02   Re: [STOCK] give_user_weapon
Reply With Quote #34

Quote:
Originally Posted by OciXCrom View Post
I believe he meant #assert, not assert.
Valid point, but I still don't think it will work. I could be wrong, but I think this is only to validate that constants are set to valid values, not for checking dynamic parameter values passed into a function. I do not have experience with using assert, this is only an assumption.

http://forum.sa-mp.com/showthread.php?t=570948
PHP Code:
//Checks compile time constants are correct. 

//For example:
#assert MAX_PLAYERS > 32

//Is equivalent to:
#if MAX_PLAYERS <= 32
    #error
#endif 
__________________

Last edited by Bugsy; 05-13-2017 at 11:13.
Bugsy is offline