AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Optional Include (https://forums.alliedmods.net/showthread.php?t=93276)

Mlk27 05-26-2009 22:30

Optional Include
 
Is it possible to make optional #include? Load/unload the include depending on cvar..

I have some sub plugins that uses native from other plugin. Sometimes I may want to disable the plugin but doing so will cause all the sub plugins fail to run

Bugsy 05-26-2009 22:41

Re: Optional Include
 
You can not load includes at run-time because they are compiled into the plugin. The only way to conditionally 'load\unload' an include is with pre-compiler directives (which occurs when you compile the plugin).

Code:
#if defined OPTION #include <fakemeta> #endif

Mlk27 05-27-2009 01:25

Re: Optional Include
 
Oh. hm that's not cool. Looks like Im gonna have to recompile all the plugins that use the native

fysiks 05-27-2009 17:59

Re: Optional Include
 
Quote:

Originally Posted by Mlk27 (Post 835495)
Oh. hm that's not cool. Looks like Im gonna have to recompile all the plugins that use the native

It shouldn't have compiled in the first place if the native wasn't included . . . unless you changed it somehow I guess.


All times are GMT -4. The time now is 01:35.

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