7erra 629 Posted June 19, 2017 Hello everyone, here is a really simple function that I put together: /* Author: Terra Description: Converts the elements of an array into a string Parameter(s): 0: ARRAY - array of elements of any type 1 (Optional): STRING - seperator between elements (default: ", ") Returns: STRING */ params [ ["_array", [],[[123]]], ["_seperator", ", ", ["123"]] ]; _str = format ["%1", _array select 0]; { private _addString = _x; if (typeName _addString != typeName "123") then {_addString = str _addString}; _str = _str +_seperator +_addString; } forEach (_array -[_array select 0]); _str Just some code that I wrote down while working on another project. Feel free to modify and comment. 1 Share this post Link to post Share on other sites
Greenfist 1863 Posted June 20, 2017 There's also the _array joinString _separator which does the same thing. 5 Share this post Link to post Share on other sites
7erra 629 Posted June 20, 2017 Oh. I knew there was this command but I barely used it. Well then nevermind :) Share this post Link to post Share on other sites
killzone_kid 1332 Posted June 21, 2017 That's right, commands are for pussies, real men use functions! 4 Share this post Link to post Share on other sites