{"name":"BIS_fnc_execVM","operator":null,"title":"BIS fnc execVM","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_execVM","revid":336359,"updated":"2022-12-29T08:50:08Z","groups":["Program Flow"],"status":"deprecated","replaced_by":["remoteExec","remoteExecCall"],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"description":"> [!CAUTION]\n> This information is **obsolete**. use remoteExec/remoteExecCall instead.\n\nexecVM desired script with desired argument(s). This function is only really useful when combined with BIS_fnc_MP to execute a script remotely.","syntaxes":[{"syntax":"filename call BIS_fnc_execVM","since":null,"effect":null,"exec":null,"params":[{"name":"filename","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"filename: String"}],"returns":{"type":"Script Handle","types":["Script Handle"],"description":"can be used to determine (via scriptDone) when the script has finished.","text":"Script Handle - can be used to determine (via scriptDone) when the script has finished."}},{"syntax":"[arguments, filename] call BIS_fnc_execVM","since":null,"effect":null,"exec":null,"params":[{"name":"arguments","type":"Anything","optional":false,"default":null,"description":"arguments are passed to script as magic variable _this.","types":["Anything"],"since":null,"text":"arguments: Anything - arguments are passed to script as magic variable _this."},{"name":"filename","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"filename: String"}],"returns":{"type":"Script Handle","types":["Script Handle"],"description":"can be used to determine (via scriptDone) when the script has finished.","text":"Script Handle - can be used to determine (via scriptDone) when the script has finished."}}],"examples":[{"text":"```sqf\n\"Bonus\\initializeExtras.sqf\" call BIS_fnc_execVM;\n```","code":["\"Bonus\\initializeExtras.sqf\" call BIS_fnc_execVM;"]},{"text":"```sqf\n[player, \"reposition.sqf\"] call BIS_fnc_execVM;\n```","code":["[player, \"reposition.sqf\"] call BIS_fnc_execVM;"]},{"text":"```sqf\n// before Arma 3 v1.50\n[[[_param1, _param2], \"addBonus.sqf\"], \"BIS_fnc_execVM\", true] call BIS_fnc_MP;\n\n// since Arma 3 v1.50\n[[_param1, _param2], \"addBonus.sqf\"] remoteExec [\"execVM\"];\n```","code":["// before Arma 3 v1.50\n[[[_param1, _param2], \"addBonus.sqf\"], \"BIS_fnc_execVM\", true] call BIS_fnc_MP;\n\n// since Arma 3 v1.50\n[[_param1, _param2], \"addBonus.sqf\"] remoteExec [\"execVM\"];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_execFSM","BIS_fnc_execRemote","BIS_fnc_spawn","BIS_fnc_call"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Program Flow","Functions","Functions: Local Effect","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}