hello.
i've read many threads on here and the wiki page, but noone appears to have asked how to remove a value from a 2d array.
im copying an array like this;
_myarray = [];
_myarray = + _copythisarray;
the wiki says to remove an item from a nested array;
_array = [["first","hello1"],["second","hello2"],["third","hello3"]];
_array set [1,-1];
_array = _array - [-1];
// _array will now contain: [["first","hello1"],["third","hello3"]]
i understand the above, but i have an array in an array in an array (2d array). example;
_myarray = [
[ [0,0,0], [1,1,1], [2,2,2] ],
[ [3,3,3], [4,4,4], [5,5,5] ],
[ [6,6,6], [7,7,7], [8,8,8] ]
];
i want to remove 2,2 for example (8,8,8). i tried many different brackets and scenarios like;
_myarray select 2 set [2, "delete_me"];
_myarray select 2 = _myarray select 2 - ["delete_me"];
or
(_myarray select 2) set [2, "delete_me"];
(_myarray select 2) = (_myarray select 2) - ["delete_me"];
i tried a few other things but they didnt work either. i keep getting error messages in game saying missing ';' end of line. which makes me think its related to how i am calling the array...
anyone come across this or know a work around?
any help would be very appreciated!
thanks for your time.
best regards,
justin