BIS fnc configPath: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3>" to "") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| arma3 | |game1= arma3 | ||
|version1= 1.00 | |||
|1.00 | |||
|gr1= Configs | |gr1= Configs | ||
|Returns config path to given entry in given format | |descr= Returns config path to given entry in given format. | ||
| | |s1= [config, format, strict] call [[BIS_fnc_configPath]] | ||
|p1= config: [[Array]], [[String]] or [[Config]] - input config | |p1= config: [[Array]], [[String]] or [[Config]] - input config | ||
|[[Array]], [[String]] or [[Config]] | |p2= format: [[Array]], [[String]] or [[Config]] - (Optional, default <sqf inline>[]</sqf> or <sqf inline>configNull</sqf> if ''config'' is [[Array]] - see {{Link|#Example 1}}) desired format of output | ||
|p3= strict: [[Boolean]] - (Optional, default [[false]]) if false, the function will not attempt to construct a valid config before certain format conversions (see {{Link|#Example 2}}). | |||
Set this param to [[true]] to invoke the strict mode | |||
|r1= [[Array]], [[String]] or [[Config]] | |||
|x1= <sqf>["configFile >> ""CfgVehicles"" >> ""Car"""] call BIS_fnc_configPath; // ["configFile","CfgVehicles","Car"]</sqf> | |||
| | |x2= <sqf>[["mary", "had", "a", "little", "lamb"], ""] call BIS_fnc_configPath; // "mary >> ""had"" >> ""a"" >> ""little"" >> ""lamb"""</sqf> | ||
| | |x3= <sqf>[["configFile","CfgVehicles","Car"]] call BIS_fnc_configPath; // bin\config.cpp/CfgVehicles/Car</sqf> | ||
|[[ | |x4= <sqf>["bin\config.cpp/CfgVehicles/Car"] call BIS_fnc_configPath; // ["configFile","CfgVehicles","Car"]</sqf> | ||
|x5= <sqf>[configFile >> "CfgVehicles" >> "Car", ""] call BIS_fnc_configPath; // "configFile >> ""CfgVehicles"" >> ""Car"""</sqf> | |||
|x6= <sqf>["bin\config.cpp/CfgVehicles/Car", "", true] call BIS_fnc_configPath; // "configFile >> ""CfgVehicles"" >> ""Car"""</sqf> | |||
|x7= <sqf>["bin\config.cpp/CfgVehicles/Car", ""] call BIS_fnc_configPath; // "bin\config.cpp/CfgVehicles/Car"</sqf> | |||
|x8= <sqf>[["mary", "had", "a", "little", "lamb"], "", true] call BIS_fnc_configPath; // "" invalid config</sqf> | |||
[[ | |seealso= [[configHierarchy]] | ||
}} |
Latest revision as of 15:34, 13 July 2022
Description
Syntax
- Syntax:
- [config, format, strict] call BIS_fnc_configPath
- Parameters:
- config: Array, String or Config - input config
- format: Array, String or Config - (Optional, default [] or configNull if config is Array - see Example 1) desired format of output
- strict: Boolean - (Optional, default false) if false, the function will not attempt to construct a valid config before certain format conversions (see Example 2). Set this param to true to invoke the strict mode
- Return Value:
- Array, String or Config
Examples
- Example 1:
- ["configFile >> ""CfgVehicles"" >> ""Car"""] call BIS_fnc_configPath; // ["configFile","CfgVehicles","Car"]
- Example 2:
- [["mary", "had", "a", "little", "lamb"], ""] call BIS_fnc_configPath; // "mary >> ""had"" >> ""a"" >> ""little"" >> ""lamb"""
- Example 3:
- Example 4:
- Example 5:
- [configFile >> "CfgVehicles" >> "Car", ""] call BIS_fnc_configPath; // "configFile >> ""CfgVehicles"" >> ""Car"""
- Example 6:
- Example 7:
- Example 8:
Additional Information
- See also:
- configHierarchy
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