CHRGD.Th3_Fr3d 1 Posted October 13, 2017 Hello there, I created some functions which i am trying to spawn with some additional parameters. Nothing special so far. [param1,param2] spawn MyFunction; works as intended and the function works perfectly fine. I am now trying to spawn this function globally so that its executed on each client. I tried something like: [[[param1,param2],MyFunction],"bis_fnc_spawn", true,true,false] call bis_fnc_mp; Problem is: the function seems to get spawned but for some reason all the global variables used in the function aren't working anymore. although they were defined a few lines above the game says "Error: undefined variable in expression: MyGlobalVariable" or something similar. So my questions are: -Is the way I spawned the function correct? -If so what else could have screwed up my global variables(all I changed was how I executed the funtion)? (If it matters I am using the functions within a mod to initialize some particle effects for all clients) Share this post Link to post Share on other sites
Tankbuster 1747 Posted October 13, 2017 These global variables need to be public if you want them defined on all the clients. Also, you are you using fnc_mp? It hasn't been 2013 for some time now. Share this post Link to post Share on other sites
CHRGD.Th3_Fr3d 1 Posted October 13, 2017 7 minutes ago, Tankbuster said: These global variables need to be public if you want them defined on all the clients. Also, you are you using fnc_mp? It hasn't been 2013 for some time now. Yeah they are public. What else should I use instead of fnc_mp? Share this post Link to post Share on other sites
CHRGD.Th3_Fr3d 1 Posted October 14, 2017 Found the solution. I spawned the functions in the wrong order. 1 Share this post Link to post Share on other sites
Tankbuster 1747 Posted October 14, 2017 13 hours ago, CHRGD.Th3_Fr3d said: What else should I use instead of fnc_mp? https://community.bistudio.com/wiki/remoteExec Share this post Link to post Share on other sites