2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-09-19 22:55:58 +00:00
|
|
|
* 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:
|
2017-06-08 13:31:51 +00:00
|
|
|
* Number <NUMBER>
|
2015-09-19 22:55:58 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* number = ["102"] call ace_common_fnc_toNumber;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-12 04:02:33 +00:00
|
|
|
|
2015-09-19 22:55:58 +00:00
|
|
|
params ["_value"];
|
|
|
|
|
2015-11-20 17:40:31 +00:00
|
|
|
if (_value isEqualType 0) exitWith {_value};
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-09-19 22:55:58 +00:00
|
|
|
parseNumber _value // return
|