Difference between revisions of "BIS fnc configPath"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (better example)
m (template:command argument fix)
Line 8: Line 8:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|Returns config path to given entry in given format |= Description
+
|Returns config path to given entry in given format |DESCRIPTION=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|  [config, format, strict] call [[BIS_fnc_configPath]]; |= Syntax
+
|  [config, format, strict] call [[BIS_fnc_configPath]]; |SYNTAX=
  
 
|p1= config: [[Array]], [[String]] or [[Config]] - input config |= Parameter 1
 
|p1= config: [[Array]], [[String]] or [[Config]] - input config |= Parameter 1
Line 17: Line 17:
 
|p3= 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 |= Parameter 3
 
|p3= 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 |= Parameter 3
  
|[[Array]], [[String]] or [[Config]] |= Return value
+
|[[Array]], [[String]] or [[Config]] |RETURNVALUE=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
Line 31: Line 31:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|[[configHierarchy]] |= See also
+
|[[configHierarchy]] |SEEALSO=
  
 
}}
 
}}

Revision as of 11:26, 7 April 2019

Introduced with Arma 3 version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.00

Description

Description:
Returns config path to given entry in given format

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

Execution:
call
Multiplayer:
-
See also:
configHierarchy

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section