Macros with optional arguments
Can I make macros with optional arguments?
|
Re: Macros with optional arguments
Give an example of what you are trying to do.
|
Re: Macros with optional arguments
I guess he means like get_systime or something like that, how you can put an optional offset. Or set a default value.
|
Re: Macros with optional arguments
After a quick look at the Pawn Language Guide, I was not able to find anything indicating this is possible with Pawn.
You're better off just using a function. |
Re: Macros with optional arguments
You have to think outside the box. %1 can be more than one argument.
For Example: Code:
stock nfv_get_data(const filename[], const key[], name[], data[]="", len=0, const identifier=';', const key_tell_start=0, &key_tell_find=0, const name_tell_start=0, &name_tell_find=0, key_copy[]="", const key_len=0, name_copy[]="", const name_len=0) |
Re: Macros with optional arguments
I tell about this
PHP Code:
|
Re: Macros with optional arguments
Code:
#define set_user_money(%1) cs_set_user_money(%1)You could also just do this: Code:
#define set_user_money cs_set_user_money |
| All times are GMT -4. The time now is 14:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.