BIS fnc configPath: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "")
m (Text replacement - " *\|= * " to " ")
Line 25: Line 25:
<nowiki>[</nowiki>["mary", "had", "a", "little", "lamb"], "", [[true]]] [[call]] [[BIS_fnc_configPath]]; // "" invalid config
<nowiki>[</nowiki>["mary", "had", "a", "little", "lamb"], "", [[true]]] [[call]] [[BIS_fnc_configPath]]; // "" invalid config
["bin\config.cpp/CfgVehicles/Car", ""] [[call]] [[BIS_fnc_configPath]]; // "bin\config.cpp/CfgVehicles/Car"
["bin\config.cpp/CfgVehicles/Car", ""] [[call]] [[BIS_fnc_configPath]]; // "bin\config.cpp/CfgVehicles/Car"
["bin\config.cpp/CfgVehicles/Car", "", [[true]]] [[call]] [[BIS_fnc_configPath]]; // "configFile >> ""CfgVehicles"" >> ""Car"""</code> |=
["bin\config.cpp/CfgVehicles/Car", "", [[true]]] [[call]] [[BIS_fnc_configPath]]; // "configFile >> ""CfgVehicles"" >> ""Car"""</code>


|[[configHierarchy]] |SEEALSO=
|[[configHierarchy]] |SEEALSO=

Revision as of 21:42, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns config path to given entry in given format
Execution:
call
Groups:
Configs

Syntax

Syntax:
[config, format, strict] call BIS_fnc_configPath;
Parameters:
config: Array, String or Config - input config
format (Optional): Array, String or Config - desired format of output. Default: Array, unless Array is input, then Config is returned (see Example 1)
strict (Optional): Boolean - by default 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"] [["configFile","CfgVehicles","Car"]] call BIS_fnc_configPath; // bin\config.cpp/CfgVehicles/Car ["bin\config.cpp/CfgVehicles/Car"] call BIS_fnc_configPath; // ["configFile","CfgVehicles","Car"] [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""" [["mary", "had", "a", "little", "lamb"], "", true] call BIS_fnc_configPath; // "" invalid config ["bin\config.cpp/CfgVehicles/Car", ""] call BIS_fnc_configPath; // "bin\config.cpp/CfgVehicles/Car" ["bin\config.cpp/CfgVehicles/Car", "", true] call BIS_fnc_configPath; // "configFile >> ""CfgVehicles"" >> ""Car"""

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


Bottom Section