ACE3/addons/common/functions/fnc_getDefinedVariableDefault.sqf

27 lines
474 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2015-09-20 22:28:25 +00:00
/*
* Author: Glowbal
* Get the variable default value
2015-01-16 23:21:47 +00:00
*
2015-09-20 22:28:25 +00:00
* Arguments:
* 0: Variable Name <STRING>
*
* Return Value:
* Default value of variable <ANY>
*
* Example:
* ["name"] call ace_common_fnc_getDefinedVariableDefault
*
2015-09-20 22:28:25 +00:00
* Public: Yes
2015-01-16 23:21:47 +00:00
*/
2015-09-20 22:28:25 +00:00
params ["_varName"];
2015-12-12 16:26:47 +00:00
private _variableDefinition = _varName call FUNC(getDefinedVariableInfo);
2015-09-20 22:28:25 +00:00
2015-11-30 16:14:05 +00:00
if !(_variableDefinition isEqualTo []) exitWith {
2015-01-18 19:09:19 +00:00
_variableDefinition select 1;
2015-01-16 23:21:47 +00:00
};
2015-09-20 22:28:25 +00:00
nil