th3gingergamer 2 Posted October 19, 2017 I have been trying to remove the group information from the caller part of '_this ' e.g. "B Alpha 1-1:1". I am trying to use splitString to split the string when it gets to a bracket as the whole string returned is "B Alpha 1-1:1 (Username)" The code I have so far is _caller = (_this select 1); _caller splitString "("; Hint format["%1 is an absolute idiot!",_caller select 1]; The error I get is about splitString expecting a string but receiving an object. I tried looking up a way to change an object to a string but had no luck. I'm extremely new to SQF (I started learning today) and any help with this would be appreciated. Share this post Link to post Share on other sites
pierremgi 4739 Posted October 19, 2017 _caller = str (_this select 1); I guess. Share this post Link to post Share on other sites
th3gingergamer 2 Posted October 19, 2017 1 minute ago, pierremgi said: _caller = str (_this select 1); I guess. I now get "Error Generic error in expression" with no useful information Share this post Link to post Share on other sites
pierremgi 4739 Posted October 19, 2017 could you send the result of _caller? Perhaps , there is no "(", so not sure _caller can be split. Share this post Link to post Share on other sites
th3gingergamer 2 Posted October 19, 2017 The error I'm getting is that _caller is an object and not a string and splitString can only split a string. The result of _caller though is "B Alpha 1-1:1 (My Name)". Share this post Link to post Share on other sites
Larrow 2800 Posted October 19, 2017 And you just want the name in the brackets? _caller = name (_this select 0); 1 Share this post Link to post Share on other sites
th3gingergamer 2 Posted October 19, 2017 Yup taking out the splitString and putting in that fixed it. Thanks! Share this post Link to post Share on other sites