Quote:
Originally Posted by Potato Uno
So from reading those articles, functions can be made into natives, but there's no way of making variables visible in other plugins?
In other words, is there not a way to import handles, strings, and numeric variables from one plugin to another? Do I need to write additional natives that would, say, insert or retrieve data from the MyArray handle in the example above?
(Which doesn't sound right, since if you run #include <tf2> you get the TFClass_Scout, TFClass_Soldier, etc variables included within the namespace of your file.)
|
When you have an #include line, it is replaced with the contents of the file during one of the preprocessor passes.
So... its OK to have an enum or constant in an include file as their values never change. On the flip side, putting a variable there ends up with each plugin having their own independent copy of the variable.
__________________