21.09.2011, 09:39
Hey,
I'm trying to script but I have a question.
Ok, say I have 2 filterscripts.
test1 and test2
test1.pwn:
new testvar = 0;
test2.pwn:
stock changevar()
{
testvar = 1;
}
changevar();
if(testvar == 1)
dothis();
I noticed if I declare variables in a .inc it can share them, but they seem to be loaded as 2 seperate instances, because if I modify the variable in 1 script it doesn't change in the other one.
Basically my question is: Is it possible to share variables between filterscripts? Like if I have an admin script and a seperate stats script, and I wanted to share the same enum for all of them. If this isn't possible, what can I do instead?
Thanks.
I'm trying to script but I have a question.
Ok, say I have 2 filterscripts.
test1 and test2
test1.pwn:
new testvar = 0;
test2.pwn:
stock changevar()
{
testvar = 1;
}
changevar();
if(testvar == 1)
dothis();
I noticed if I declare variables in a .inc it can share them, but they seem to be loaded as 2 seperate instances, because if I modify the variable in 1 script it doesn't change in the other one.
Basically my question is: Is it possible to share variables between filterscripts? Like if I have an admin script and a seperate stats script, and I wanted to share the same enum for all of them. If this isn't possible, what can I do instead?
Thanks.