BIS fnc loadFunctions: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Variables(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 7: | Line 6: | ||
|gr1 = Diagnostic |GROUP1= | |gr1 = Diagnostic |GROUP1= | ||
| Compile scripts and save them into globally available functions. Defines [[_fnc_scriptName]] variable. |Description= | | Compile scripts and save them into globally available functions. Defines [[_fnc_scriptName]] variable. |Description= | ||
| [fileDirectory, prefix, nameVars, global] call [[BIS_fnc_loadFunctions]] |Syntax= | | [fileDirectory, prefix, nameVars, global] call [[BIS_fnc_loadFunctions]] |Syntax= | ||
Line 25: | Line 22: | ||
| [[Boolean]] - [[true]] when done |Return value= | | [[Boolean]] - [[true]] when done |Return value= | ||
|x1= <code>["scripts\myDir\", "MY_fnc_", ["script1", "script2"], [[true]]] [[call]] [[BIS_fnc_loadFunctions]];</code> |Example 1= | |x1= <code>["scripts\myDir\", "MY_fnc_", ["script1", "script2"], [[true]]] [[call]] [[BIS_fnc_loadFunctions]];</code> |Example 1= | ||
|x2= <code>["scripts\myDir\", "MY_fnc_", [["script1", "script1file"], ["script2", "script2file"]], [[false]]] [[call]] [[BIS_fnc_loadFunctions]];</code> |Example 2= | |x2= <code>["scripts\myDir\", "MY_fnc_", [["script1", "script1file"], ["script2", "script2file"]], [[false]]] [[call]] [[BIS_fnc_loadFunctions]];</code> |Example 2= | ||
| [[compile]], [[compileFinal]], [[preprocessFileLineNumbers]] |See also= | | [[compile]], [[compileFinal]], [[preprocessFileLineNumbers]] |See also= |
Revision as of 23:32, 16 January 2021
Description
- Description:
- Compile scripts and save them into globally available functions. Defines _fnc_scriptName variable.
- Execution:
- call
- Groups:
- Diagnostic
Syntax
- Syntax:
- [fileDirectory, prefix, nameVars, global] call BIS_fnc_loadFunctions
- Parameters:
- fileDirectory: String - script path
- prefix: String - variable prefix
- nameVars: Array of Strings or Array of Array - list of variables to be declared.
- global: Boolean - true for global persistent execution on all clients
- Return Value:
- Boolean - true when done
Examples
- Example 1:
["scripts\myDir\", "MY_fnc_", ["script1", "script2"], true] call BIS_fnc_loadFunctions;
- Example 2:
["scripts\myDir\", "MY_fnc_", [["script1", "script1file"], ["script2", "script2file"]], false] call BIS_fnc_loadFunctions;
Additional Information
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