Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:3.3

Description

Description:Returns the value of the specified configuration property.

Syntax

Syntax:[config, default] call fn_vbs_getConfigValue
Parameters:
  • config: Config-2 - The path to the configuration property to read.
  • default: String, Number, or Array - The default value to return, if no configuration entry is found.
Return Value:String, Number ,or Array - The value of the configuration entry (or the defined default, if no entry is found). If the type of the default value does not match the type of the queried entry, then the default value is returned. If no default value is provided, then the function tries to determine the type itself. If no default is provided, and no matching property is found, then 0 is returned.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
_configPath = configFile>>"CfgVehicles">>"LandRover">>"simulation";
_simulation = [_configPath,"unknown"] call fn_vbs_getConfigValue;

Additional Information

See also: getText, getNumber, getArray
Multiplayer: 
Problems: 

Notes