Posts: 11
Threads: 4
Joined: Feb 2010
Reputation:
0
Is it possible to have a variable be recognized in different filterscripts (or other scripts) in Pawn?
In C/C++ I knew just to place "extern vname" in the header file, then define the variable in one other file. After that, all of the files could see it, and it would be the same variable... anything like this in Pawn?
Posts: 11
Threads: 4
Joined: Feb 2010
Reputation:
0
I haven't tried yet but... will the variable in the include just be two separate variables when they enter the script?
Like able to have to have diff. values? I do not want that to happen.
Posts: 549
Threads: 20
Joined: Jan 2010
Reputation:
0
I am not sure. You have to test yourself.
Posts: 11
Threads: 4
Joined: Feb 2010
Reputation:
0
is that the only way? Is this used alot?
(btw, the include "solution" did not work)
Posts: 2,593
Threads: 38
Joined: Aug 2007
Reputation:
0
Yeah includes wouldn't work, using an include is just like sticking the include's code into the .pwn, nothing else.
You can use the property solution like BlockFoX suggested, or you can create a public callback and use CallRemoteFunction("MyCallBack","ifs",integer,Floa t:float,string[]); which will call MyCallBack(integer,Float:float,string[]) in the GM and all 16 FSs