Merge pull request #3641 from acemod/improveCodeToString

improve Code to String
This commit is contained in:
commy2
2016-03-31 00:07:42 +02:00

View File

@ -12,12 +12,11 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
params ["_function"]; params ["_code"];
if (_code isEqualType "") exitWith {_code};
if (_function isEqualType "") exitWith {_function}; _code = str(_code);
_code = _code select [1, count _code - 2];
_function = toArray str _function; _code
_function deleteAt 0;
_function deleteAt (count _function - 1);
toString _function // return