BIS fnc loadFunctions: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=]{12})" to "|$1=$2 |descr=$3") |
Lou Montana (talk | contribs) m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|") |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
| arma3 | |game1= arma3 | ||
|version1= 1.00 | |||
|1.00 | |||
|gr1= Diagnostic | |gr1= Diagnostic | ||
Line 9: | Line 8: | ||
|descr= Compile scripts and save them into globally available functions. Defines [[_fnc_scriptName]] variable. | |descr= Compile scripts and save them into globally available functions. Defines [[_fnc_scriptName]] variable. | ||
|s1=[fileDirectory, prefix, nameVars, global] call [[BIS_fnc_loadFunctions]] | |s1= [fileDirectory, prefix, nameVars, global] call [[BIS_fnc_loadFunctions]] | ||
|p1= fileDirectory: [[String]] - script path | |p1= fileDirectory: [[String]] - script path | ||
|p2= prefix: [[String]] - variable prefix {{Feature| | |p2= prefix: [[String]] - variable prefix {{Feature|informative|{{hl|"BIS_fnc_"}} prefix is reserved and cannot be used.}} | ||
|p3= nameVars: [[Array]] of [[String | |p3= nameVars: [[Array]] of [[String]]s '''or''' [[Array]] of [[Array]] - list of variables to be declared. | ||
* [[Array]] of [[String | * [[Array]] of [[String]]s to format [variable, variable, …] - final variable is {{hl|prefix + variable}}, loaded from {{hl|path + variable + ".sqf"}} | ||
* [[Array]] of [[Array]] to format [<nowiki/>[variable, fileName], [variable, fileName], …] - final variable is | * [[Array]] of [[Array]] to format [<nowiki/>[variable, fileName], [variable, fileName], …] - final variable is {{hl|prefix + variable}}, loaded from {{hl|path + fileName + ".sqf"}} | ||
|p4= global: [[Boolean]] - [[true]] for global persistent execution on all clients | |p4= global: [[Boolean]] - [[true]] for global persistent execution on all clients | ||
|r1=[[Boolean]] - [[true]] when done | |r1= [[Boolean]] - [[true]] when done | ||
|x1= < | |x1= <sqf>["scripts\myDir\", "MY_fnc_", ["script1", "script2"], true] call BIS_fnc_loadFunctions;</sqf> | ||
|x2= < | |x2= <sqf>["scripts\myDir\", "MY_fnc_", [["script1", "script1file"], ["script2", "script2file"]], false] call BIS_fnc_loadFunctions;</sqf> | ||
|seealso= [[compile]] | |seealso= [[compile]] [[compileFinal]] [[preprocessFileLineNumbers]] | ||
}} | }} |
Latest revision as of 00:24, 2 February 2024
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:
- Example 2:
Additional Information
- See also:
- compile compileFinal preprocessFileLineNumbers
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