{"name":"BIS_fnc_randomIndex","operator":null,"title":"BIS fnc randomIndex","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_randomIndex","revid":327174,"updated":"2022-07-12T22:07:07Z","groups":["Arrays"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Return a random integer representing an index in the passed array.","syntaxes":[{"syntax":"array call BIS_fnc_randomIndex","since":null,"effect":null,"exec":null,"params":[{"name":"array","type":"Array of Anything","optional":false,"default":null,"description":null,"types":["Array","Anything"],"since":null,"text":"array: Array of Anything"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"}}],"examples":[{"text":"```sqf\n[\"a\", 0, objNull] call BIS_fnc_randomIndex; // returns 0, 1 or 2\n```","code":["[\"a\", 0, objNull] call BIS_fnc_randomIndex; // returns 0, 1 or 2"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["floor","count","random","selectRandom"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Arrays","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}