ACE3/addons/common/functions/fnc_codeToString.sqf

23 lines
411 B
Plaintext
Raw Normal View History

/*
* Author: commy2
* Removes the brackets around a code and returns the code as a string. It does nothing if the code is already a string.
*
2015-09-18 14:41:00 +00:00
* Arguments:
2015-09-18 13:40:51 +00:00
* 0: Code <CODE, STRING>
*
* Return Value:
2015-09-18 13:40:51 +00:00
* Code <STRING>
*
* Public: Yes
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
2016-03-30 21:02:52 +00:00
params ["_code"];
if (_code isEqualType "") exitWith {_code};
2016-03-30 21:02:52 +00:00
_code = str(_code);
_code = _code select [1, count _code - 2];
2016-03-30 21:02:52 +00:00
_code
2015-09-18 13:40:51 +00:00