ACE3/addons/common/functions/fnc_getDefinedVariableDefault.sqf
Neviothr 75f7ed7532
Utilize isNotEqualTo (#7929)
* Utilize isNotEqualTo

* undo changes to some files

* redo some changes, fix based on @Vdauphin 's comment

* fix validator issues

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2021-02-27 11:05:05 -06:00

27 lines
476 B
Plaintext

#include "script_component.hpp"
/*
* Author: Glowbal
* Get the variable default value
*
* Arguments:
* 0: Variable Name <STRING>
*
* Return Value:
* Default value of variable <ANY>
*
* Example:
* ["name"] call ace_common_fnc_getDefinedVariableDefault
*
* Public: Yes
*/
params ["_varName"];
private _variableDefinition = _varName call FUNC(getDefinedVariableInfo);
if (_variableDefinition isNotEqualTo []) exitWith {
_variableDefinition select 1;
};
nil