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:
|
|
|
|
* <NUMBER>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* number = ["102"] call ace_common_fnc_toNumber;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-12 04:02:33 +00:00
|
|
|
|
2015-09-19 22:55:58 +00:00
|
|
|
params ["_value"];
|
|
|
|
|
|
|
|
if (typeName _value == "SCALAR") exitWith {_value};
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-09-19 22:55:58 +00:00
|
|
|
parseNumber _value // return
|