BIS fnc randomIndex: Difference between revisions
Jump to navigation
Jump to search
m (copy paste error) |
Lou Montana (talk | contribs) (Page filling) |
||
Line 1: | Line 1: | ||
{{Function|= Comments | {{Function|= Comments | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 8: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Return a random integer representing an index in the passed array. |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | array call [[BIS_fnc_randomIndex]] |= Syntax | ||
|p1= |= Parameter 1 | |p1= array: [[Array]] of [[Anything]] |= Parameter 1 | ||
| |= Return value | | [[Number]] |= Return value | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code></code> |= | |x1= <code>["a",0,objNull] [[call]] [[BIS_fnc_randomIndex]]; {{codecomment|// returns 0, 1 or 2}}</code> |= Example 1 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| |= See also | | [[floor]], [[count]], [[random]], [[selectRandom]] |= See also | ||
}} | }} | ||
Revision as of 13:27, 27 April 2018
Description
- Description:
- Return a random integer representing an index in the passed array.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- array call BIS_fnc_randomIndex
- Parameters:
- array: Array of Anything
- Return Value:
- Number
Examples
- Example 1:
["a",0,objNull] call BIS_fnc_randomIndex; // returns 0, 1 or 2
Additional Information
- See also:
- floorcountrandomselectRandom
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