Naiss 28 Posted October 19, 2014 when i try to spawn BIS_fnc_MP; it wont work for some reason and the BIS_fnc_MP command worked just fine yesterday BIS_fnc_MP spawn here: _msg = format ["someone is robbing a Gas station at %1",mapGridPosition player]; [[_this,_msg], "ARPG_Robbing_gas_tellServerStart", west] spawn BIS_fnc_MP; Call to this Function: ARPG_Robbing_gas_tellServerStart = { _g = _this select 1; player globalChat _g; }; Share this post Link to post Share on other sites
Schatten 290 Posted October 19, 2014 1 BIS_fnc_MP is function, not script, so use call instead spawn. 2 ARPG_Robbing_gas_tellServerStart must be known to computer on which called. 3 You can use this code: [[player, _msg], "globalChat"] call BIS_fnc_MP; Share this post Link to post Share on other sites
Naiss 28 Posted October 19, 2014 i have alweys been using spawn and i'ts just working fine but ill test it soon Share this post Link to post Share on other sites
jshock 513 Posted October 19, 2014 i have alweys been using spawn and i'ts just working fine but ill test it soon Almost all of the BIS_fnc I have seen or used are called not spawned, because most return a value and don't need to be run on a scheduled environment. Share this post Link to post Share on other sites
dreadedentity 278 Posted October 19, 2014 Use call to run BIS_fnc_MP, read the documentation again, the last parameter is used to set whether you want the function to be called or spawned. Share this post Link to post Share on other sites
das attorney 858 Posted October 19, 2014 BIS_FNC_MP is different to most functions in that it makes little difference if you call or spawn on YOUR OWN machine. [args,"functionName",TRUE] call BIS_fnc_MP; Is pretty much the same as: [args,"functionName",TRUE] spawn BIS_fnc_MP; It is the 5th parameter that determines if it called or spawned on the TARGET machines (which may include your own). [args,"functionName",TRUE,FALSE,TRUE] spawn BIS_fnc_MP; <== calls it on target machines [args,"functionName",TRUE,FALSE,TRUE] call BIS_fnc_MP; <== calls it on target machines [args,"functionName",TRUE,FALSE,FALSE] call BIS_fnc_MP; <== spawns it on target machines If you don't define it as TRUE, then the func is spawned by default. I don't think that's the issue here anyway. EDIT: Ninja'd Share this post Link to post Share on other sites
Naiss 28 Posted October 19, 2014 okey thanks for the info :D Share this post Link to post Share on other sites