Kushluk 21 Posted August 28, 2013 (edited) I have a single large array containing a large number of arrays which each contain three randomly generated strings. _array = [ [ "A","B","C" ] , [ "D","E","F" ] , [ "G","H","I" ] , [...] , [...] ....]; I have one of those strings. _mystring will always be the third element. _mystring = "F"; I now need to remove the array holding that string from the large array. [ "D","E","F" ]; It should look like this afterwards: _array = [ [ "A","B","C" ] , [ "G","H","I" ] , [...] , [...] ....]; I have investigated find and number other tutorials [1,2,3], however I am struggling with the searching and array subtraction :confused: If anyone could assist me with completing my code segment, I would be highly appreciative: _largeArray = [ [ "A","B","C" ] , [ "D","E","F" ] , [ "G","H","I" ] , [ "J","K","L" ] ]; _myString = "L"; // ........................ // Assistance needed to fill in the gaps here. The string _myString could be "C", "F", "I" or "L" in this case. // ........................ _largeArray = [ [ "A","B","C" ] , [ "D","E","F" ] , [ "G","H","I" ] ]; Edited August 28, 2013 by Kushluk typo Share this post Link to post Share on other sites
kylania 568 Posted August 28, 2013 Check out the functions viewer. There's quite a few BIS functions dealing with arrays that might help. Share this post Link to post Share on other sites
Larrow 2822 Posted August 28, 2013 (edited) _largeArray = [ [ "A","B","C" ] , [ "D","E","F" ] , [ "G","H","I" ] , [ "J","K","L" ] ]; _myString = "L"; { if (_myString in _x) then { _largeArray set [_forEachIndex, -1]; }; }forEach _largeArray; _laregArray = _largeArray - [-1]; Good thread to read about arrays Edited August 28, 2013 by Larrow Share this post Link to post Share on other sites
Kushluk 21 Posted August 28, 2013 Thank you very much Larrow. That is very helpful. Share this post Link to post Share on other sites