Difference between revisions of "getVariable"

From Bohemia Interactive Community
Jump to navigation Jump to search
(syntax format)
m (formatted return value)
Line 49: Line 49:
 
|p24= defaultValue: [[Anything]] - Value to return if variable doesn't exist |= Parameter 3
 
|p24= defaultValue: [[Anything]] - Value to return if variable doesn't exist |= Parameter 3
  
|r2= [[Anything]] or ''defaultValue'' if the variable doesn't exist.<br>
+
|r2= [[Anything]] - ''defaultValue'' if the variable doesn't exist.<br>
 
'''Note:''' If the ''varspace'' is nonexistent ([[objNull]], [[grpNull]], [[controlNull]] ..etc), return is [[nil]] |= Return value 2
 
'''Note:''' If the ''varspace'' is nonexistent ([[objNull]], [[grpNull]], [[controlNull]] ..etc), return is [[nil]] |= Return value 2
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________

Revision as of 18:01, 25 January 2017

Template:Command

Notes

Bottom Section

Posted on August 13, 2016 - 17:13 (UTC)
Ebay
NOTE: Arma 2 ONLY! In Arma 3 this will return default value. Warning: the alternative syntax returns undefined when the varspace is an object and that object is null. Example:
_test = objNull getVariable ["test","0"]; systemChat _test; Errors because _test is undefined. Tested in A2OA 1.63.131129