Jump to content

Recommended Posts

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

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×