ACE3/addons/common/functions/fnc_toNumber.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

23 lines
448 B
Plaintext

/*
* 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
*/
#include "script_component.hpp"
params ["_value"];
if (_value isEqualType 0) exitWith {_value};
parseNumber _value // return