Quote:
Originally Posted by aexi0n
Quick Question. So my plugin is written with about 8 different files currently, and uses natives for needed information from each other. I'm trying to optimize the code completely, and make it so I have "myplugin_main", and include the other files such as "myplugin_hooks", "myplugin_commands", etc.
I've got this all working fine, but I have a question regarding which variables are usable. I know that the file "myplugin_main" will have access to all global vars from any of the other files it includes.
But in an included such as "myplugin_hooks", would I be able to use a global variable from another include file such as "myplugin_commands"
If so, is there some special way to do this? Can't seem to figure it out. 
|
Why aren't your globals all in one include?
If you want a global variable modified by your entire plugin, u might as well compile your plugin with your globals being in one single file

to be used by the rest of it.
If you're not going to use globals in each respective file, you have to use local variables or functions that modify and sent data to and fro.
__________________