ACE3/addons/common/functions/fnc_getDefinedVariableDefault.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

27 lines
479 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