BIS_fnc_parseNumberSafe

From Bohemia Interactive Community
Revision as of 16:16, 3 May 2022 by Lou Montana (talk | contribs) (Some wiki formatting)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Hover & click on the images for description

Description

Description:
Converts expression into a number. Can also convert array of expressions into an array of numbers. If expression does not return a number, 0 is returned.
Execution:
call
Groups:
Arrays

Syntax

Syntax:
[input] call BIS_fnc_parseNumberSafe
Parameters:
input: Number, String, Array, Side, Config or Array - If type is array, array may contain any of the mentioned data types
Return Value:
Number or array of numbers if array is passed as an argument

Examples

Example 1:
[safeZoneX, safeZoneWAbs, configFile] call BIS_fnc_parseNumberSafe; // returns [-0.452381,1.90476,0]
Example 2:
["1337", "2013", date] call BIS_fnc_parseNumberSafe; // returns [1337,2013,[2036,1,1,6,58]]
Example 3:
[west, east, independent, civilian] call BIS_fnc_parseNumberSafe; // returns [1,0,2,3]

Additional Information

See also:
parseNumber BIS_fnc_parseNumber

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note