You can also mention the "stringize" operator (inherited from Pawn) which converts arguments to packed strings in a macro.
I don't find it that useful but still here's an example:
Code:
// Note that spaces inside parentheses count too!!! STRINGIZE( abc123 ) = " abc123 "
#define STRINGIZE(%0) #%0
ConVar myplugin_enabled; // typical toggle convar
Action ServerCmd_DoStuff(int args) {
if ( !myplugin_enabled.BoolValue ) {
PrintToServer( "Plugin is disabled! " ... STRINGIZE(myplugin_enabled) ... " = 0" ); // "Plugin is disabled! myplugin_enabled = 0"
return Plugin_Handled;
}
// ...
return Plugin_Handled;
}
__________________