BIS fnc parseNumberSafe: Difference between revisions
Jump to navigation
Jump to search
m (page filled) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 1.96 | |||
| | |gr1= Arrays | ||
|descr= 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. | |||
|s1= [input] call [[BIS_fnc_parseNumberSafe]] | |||
|p1= input: [[Number]], [[String]], [[Side]], [[Config]] or [[Array]] - if type is array, array may contain any of the mentioned data types | |||
| | |r1= [[Number]] or [[Array]] of [[Number]]s if ''input'' is an [[Array]] | ||
| | |x1= <sqf>[safeZoneX, safeZoneWAbs, configFile] call BIS_fnc_parseNumberSafe; // returns [-0.452381,1.90476,0]</sqf> | ||
| | |x2= <sqf>["1337", "2013", date] call BIS_fnc_parseNumberSafe; // returns [1337,2013,[2036,1,1,6,58]]</sqf> | ||
|x3= <sqf>[blufor, opfor, independent, civilian] call BIS_fnc_parseNumberSafe; // returns [1,0,2,3]</sqf> | |||
|x3= < | |||
|seealso= [[parseNumber]] [[BIS_fnc_parseNumber]] | |seealso= [[parseNumber]] [[BIS_fnc_parseNumber]] | ||
}} | }} | ||
Latest revision as of 14:50, 8 November 2023
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, 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 input is an Array
Examples
- Example 1:
- [safeZoneX, safeZoneWAbs, configFile] call BIS_fnc_parseNumberSafe; // returns [-0.452381,1.90476,0]
- Example 2:
- Example 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