AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Determining debug status (https://forums.alliedmods.net/showthread.php?t=25875)

akysiev 03-22-2006 13:56

Determining debug status
 
I've always wondered, is there a way to determine within a script whether or not the script is being run in debug mode?

v3x 03-22-2006 17:51

http://www.amxmodx.org/funcwiki.php?go=func&id=225

Code:
 get_plugin ( index,filename[],len1,name[],len2,version[],len3,author[],len4,status[],len5 )

Maybe?

BAILOPAN 03-22-2006 19:49

yup, that's right. or getting the plugin flags.

HINT: if you need to know whether your plugin is in debug mode, you're doing something wrong ;)

akysiev 03-22-2006 20:30

Thanks! I'd just rather output debug messages and execute test queries only when in debug mode. I know I could do that with a simple little preprocessor directive but now that I know how to do it this way, :D

v3x 03-22-2006 20:47

Code:
if(plugin_flags() & AMX_FLAG_DEBUG) {   // }
I believe that's what bail was talking about.


All times are GMT -4. The time now is 16:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.