Difference between revisions of "DCS func getValueDictByKey"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
Line 13: Line 13:
 
|par4=
 
|par4=
  
|desc= Returns a string associated with the passed dictionary key value.
+
|desc= Returns a string associated with the passed dictionary key value. If the key is not found within the miz the function will return the string that was passed.  
  
|rtnType= function
+
|rtnType= string
  
 
|rtnExample= string
 
|rtnExample= string

Revision as of 23:17, 20 January 2021

Scripting Root

Envrioment: Mission Scripting
Function: getValueDictByKey Added with: 1.5
Member Of: env
Syntax: string env.getValueDictByKey(string value )
Description: Returns a string associated with the passed dictionary key value. If the key is not found within the miz the function will return the string that was passed.


Return Value: string
Return Example: string
Examples: groupName = env.getValueDictByKey('DictKey_GroupName_5')
Related Functions: env functions: info, warning, error, setErrorMessageBoxEnabled, getValueDictByKey
Notes: With DCS 1.5 the mission file format has been changed. For localization reasons a large number of items are now saved in a lookup table within the .miz file. When parsing the mission file group names will appear as "Dictkey_groupName_x" however this value is of no use to the scripting engine. This function converts "dict key" value to its actual name.