Global variables not read from another file which is already hooked. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Global variables not read from another file which is already hooked. (
/showthread.php?tid=653741)
Global variables not read from another file which is already hooked. -
iSpark - 11.05.2018
Note. I'm using y_hooks.
Let's assume there is a FileA.pwn. And there is an inc folder which has core.inc and AdminCMDs.inc.
Now core.inc has a global variable named 'g_whatever'.
I want to know whether or not I can access 'g_whatever' which resides in core.inc from AdminCMDs.inc.
Because so far. I've tried accessing a global variable from another file and it does not even recognize in the other file from where I'm trying to access it.
Any help would be appreciated.
Re: Global variables not read from another file which is already hooked. -
iSpark - 11.05.2018
Nevermind. I totally ignored the fact that the variable that I was declaring was a static variable. The scope was the main issue.
Close this please.