I've been attempting to add script spawned units as CAS and noticed this function was around. However I'm having difficulty getting it to work.
The example given on the wiki (altered to spawn the unit on an invisible helipad) is ["CAS",[getMarkerPos Pad_1,0,"B_Heli_Attack_01_F","EAGLE ONE",{},0]] call ALiVE_fnc_CombatSupportAdd;
which gives the following error;
14:45:45 Error in expression < 3); _code = _array select 4; _height = parsenumber(_array select 5); _casfsm => 14:45:45 Error position: <parsenumber(_array select 5); _casfsm => 14:45:45 Error parsenumber: Type Number, expected Bool,String 14:45:45 File x\alive\addons\sup_combatsupport\scripts\NEO_radio\functions\misc\fn_supportAdd.sqf, line 101
I got around this by changing the line to ["CAS",[getMarkerPos Pad_1,0,"B_Heli_Attack_01_F","EAGLE ONE",{},"0"]] call ALiVE_fnc_CombatSupportAdd;
which spawned the correct vehicle in place, but failed to add it to the CAS menu via the alive tablet. It also spat out the following error;
15:31:26 WARNING: Function 'name' - 4f980080# 164018: coveralls.p3d has no unit 15:31:26 - network id 0:0 15:31:26 - person 15:31:26 WARNING: Function 'name' - 4f980080# 164018: coveralls.p3d has no unit 15:31:26 - network id 0:0 15:31:26 - person 15:31:27 WARNING: Function 'name' - 4c904080# 164021: coveralls.p3d has no unit 15:31:27 - network id 0:0 15:31:27 - person 15:31:27 WARNING: Function 'name' - 4c904080# 164021: coveralls.p3d has no unit 15:31:27 - network id 0:0 15:31:27 - person 15:31:27 Error in expression < _split = []; _index = 0; _inputCount = count _input; _separatorCount = count _s> 15:31:27 Error position: <count _input; _separatorCount = count _s> 15:31:27 Error count: Type code, expected Array,String,Config entry 15:31:27 File x\cba\addons\strings\fnc_split.sqf, line 13
I'm not really sure where to go from here. Regardless of the problems above, the function doesn't do quite what I was looking for. I can achieve similar results with it though, and at this point I'm more curious if it's something I've done wrong or not.