BIS fnc execVM: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " {{Function|Comments=" to "{{Function|Comments=")
m (Fix Script link)
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Program Flow


|arg= |MPARGUMENTS=
|eff= local


|eff= local |Effects in MP=
|descr= {{Feature|obsolete|use [[remoteExec]]/[[remoteExecCall]] instead.|arma3|1.50}}
____________________________________________________________________________________________
[[execVM]] desired script with desired argument(s). This function is only really useful when combined with [[BIS_fnc_MP]] to execute a script remotely.


|[[execVM]] desired script with desired argument(s). This function is only really useful when combined with [[BIS_fnc_MP]] to execute a script remotely. |DESCRIPTION=
____________________________________________________________________________________________


| filename call [[BIS_fnc_execVM]] |SYNTAX=
|s1= filename call [[BIS_fnc_execVM]]


|p1= filename: [[String]] |PARAMETER1=
|p1= filename: [[String]]


| [[Script]] - script handle, which can be used to determine (via [[scriptDone]]) when the script has finished. |RETURNVALUE=
|r1= [[Script Handle]] - can be used to determine (via [[scriptDone]]) when the script has finished.
____________________________________________________________________________________________


|s2= [argument(s), filename] call [[BIS_fnc_execVM]] |Alternative Syntax=
|s2= [arguments, filename] call [[BIS_fnc_execVM]]


|p21= argument(s): [[Any Value]] - Arguments are passed to script as magic variable [[_this]]. |PARAMETER21=
|p21= arguments: [[Anything]] - arguments are passed to script as magic variable [[Magic Variables#this|_this]].


|p22= filename: [[String]] |PARAMETER22=
|p22= filename: [[String]]


|r2= [[Script]] - script handle, which can be used to determine (via [[scriptDone]]) when the script has finished. |RETURNVALUE2=
|r2= [[Script Handle]] - can be used to determine (via [[scriptDone]]) when the script has finished.
____________________________________________________________________________________________


|x1= <code>"Bonus\initializeExtras.sqf" call [[BIS_fnc_execVM]];</code> |EXAMPLE1=
|x1= <sqf>"Bonus\initializeExtras.sqf" call BIS_fnc_execVM;</sqf>


|x2= <code><nowiki>[</nowiki>[[player]],"reposition.sqf"] call [[BIS_fnc_execVM]];</code> |EXAMPLE2=
|x2= <sqf>[player, "reposition.sqf"] call BIS_fnc_execVM;</sqf>


|x3= <code><nowiki>[[</nowiki>[_param1, _param2], "addBonus.sqf"], "[[BIS_fnc_execVM]]", [[true]]] call [[BIS_fnc_MP]];</code> |EXAMPLE3=
|x3= <sqf>
____________________________________________________________________________________________
// before Arma 3 v1.50
[[[_param1, _param2], "addBonus.sqf"], "BIS_fnc_execVM", true] call BIS_fnc_MP;


| [[BIS_fnc_execFSM]], [[BIS_fnc_execRemote]], [[BIS_fnc_spawn]], [[BIS_fnc_call]] |SEEALSO=
// since Arma 3 v1.50
[[_param1, _param2], "addBonus.sqf"] remoteExec ["execVM"];
</sqf>
 
|seealso= [[BIS_fnc_execFSM]] [[BIS_fnc_execRemote]] [[BIS_fnc_spawn]] [[BIS_fnc_call]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: MP|{{uc:execVM}}]]
[[Category:Functions|{{uc:execVM}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:execVM}}]]

Latest revision as of 09:50, 29 December 2022

Hover & click on the images for description

Description

Description:
🕖
This information is obsolete as of Arma 3 v1.50. Reason: use remoteExec/remoteExecCall instead.
execVM desired script with desired argument(s). This function is only really useful when combined with BIS_fnc_MP to execute a script remotely.
Execution:
call
Groups:
Program Flow

Syntax

Syntax:
filename call BIS_fnc_execVM
Parameters:
filename: String
Return Value:
Script Handle - can be used to determine (via scriptDone) when the script has finished.

Alternative Syntax

Syntax:
[arguments, filename] call BIS_fnc_execVM
Parameters:
arguments: Anything - arguments are passed to script as magic variable _this.
filename: String
Return Value:
Script Handle - can be used to determine (via scriptDone) when the script has finished.

Examples

Example 1:
"Bonus\initializeExtras.sqf" call BIS_fnc_execVM;
Example 2:
[player, "reposition.sqf"] call BIS_fnc_execVM;
Example 3:
// before Arma 3 v1.50 [[[_param1, _param2], "addBonus.sqf"], "BIS_fnc_execVM", true] call BIS_fnc_MP; // since Arma 3 v1.50 [[_param1, _param2], "addBonus.sqf"] remoteExec ["execVM"];

Additional Information

See also:
BIS_fnc_execFSM BIS_fnc_execRemote BIS_fnc_spawn BIS_fnc_call

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note