ACE3/addons/common/functions/fnc_toNumber.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

23 lines
451 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Garth de Wet (LH)
* Takes a string/number and returns the number.
*
* Arguments:
* 0: Value to attempt to convert to number or if number simply return number. <STRING, NUMBER>
*
* Return Value:
* Number <NUMBER>
*
* Example:
* number = ["102"] call ace_common_fnc_toNumber;
*
* Public: Yes
*/
params ["_value"];
if (_value isEqualType 0) exitWith {_value};
parseNumber _value // return