{"name":"BIS_fnc_removeIndex","operator":null,"title":"BIS fnc removeIndex","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_removeIndex","revid":323162,"updated":"2022-07-01T10:34:55Z","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":"Takes an array, and returns a new array with the specified index(es) removed.\nThis takes the array passed in the first parameter, and returns an array that has the index number in the second parameter removed.\nIf a third parameter is passed, then a range of indexes will be removed.\nAlternatively, an array of indices to remove can be passed in the second parameter.\n\n> [!NOTE]\n> **Arma 3:** Use deleteAt or deleteRange instead.","syntaxes":[{"syntax":"[array, startIndex, endIndex] call BIS_fnc_removeIndex","since":null,"effect":null,"exec":null,"params":[{"name":"array","type":"Array","optional":false,"default":null,"description":null,"types":["Array"],"since":null,"text":"array: Array"},{"name":"startIndex","type":"Number","optional":false,"default":null,"description":"start index to be removed, if #Parameter 3 is not provided, only this index is removed","types":["Number"],"since":null,"text":"startIndex: Number - start index to be removed, if #Parameter 3 is not provided, only this index is removed"},{"name":"endIndex","type":"Number","optional":true,"default":"Nothing","description":"end index, if provided the indexs from startIndex to endIndex will be removed","types":["Number"],"since":null,"text":"endIndex: Number - (Optional, default Nothing) -  end index, if provided the indexs from startIndex to endIndex will be removed"}],"returns":{"type":"Array","types":["Array"],"description":"new array with new values","text":"Array - new array with new values"}},{"syntax":"[array, indices] call BIS_fnc_removeIndex","since":null,"effect":null,"exec":null,"params":[{"name":"array","type":"Array","optional":false,"default":null,"description":null,"types":["Array"],"since":null,"text":"array: Array"},{"name":"indices","type":"Array of Numbers","optional":false,"default":null,"description":"indices to be removed","types":["Array","Number"],"since":null,"text":"indices: Array of Numbers - indices to be removed"}],"returns":{"type":"Array","types":["Array"],"description":"new array with new values","text":"Array - new array with new values"}}],"examples":[{"text":"```sqf\nprivate _array = [0,1,2,3,4];\n[array, 0] call BIS_fnc_removeIndex; // returns [1,2,3,4]\n```","code":["private _array = [0,1,2,3,4];\n[array, 0] call BIS_fnc_removeIndex; // returns [1,2,3,4]"]},{"text":"```sqf\nprivate _array = [0,1,2,3,4];\n[_array, 0, 4] call BIS_fnc_removeIndex; // returns []\n```","code":["private _array = [0,1,2,3,4];\n[_array, 0, 4] call BIS_fnc_removeIndex; // returns []"]},{"text":"```sqf\nprivate _array = [0,1,2,3,4];\n[_array, [0,4]] call BIS_fnc_removeIndex; // returns [1,2,3]\n```","code":["private _array = [0,1,2,3,4];\n[_array, [0,4]] call BIS_fnc_removeIndex; // returns [1,2,3]"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["deleteAt","deleteRange"],"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":[]}