ALiVE_fnc_CombatSupportAdd issues (solved)

  1. 8 years ago

    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.

  2. Edited 8 years ago by SpyderBlack723

    Hi, I might have made an error in writing the example. I will test a few things in game and have it updated if so.

    Edit: Yes, it appears I have mis-written it :(

  3. Edited 8 years ago by SpyderBlack723

    Here are the correct instructions
    http://alivemod.com/forum/1292-advanced-combat-support-rules-adjustment/p1#p4653

    @SavageCDN When you have time can you change the information on the wiki to the proper instructions in that post please?

  4. Awesome, appreciate the swift response. I actually had that page open on a different tab but copied the example from the wiki instead. ["CAS",[getMarkerPos Pad_1,0,"B_Heli_Attack_01_F","EAGLE ONE","",""]] Call ALiVE_fnc_combatSupportAdd; works perfectly with no errors. Thanks.

  5. highhead

    25 Apr 2016 Administrator

    Thanks mate!

    We will update our Wiki in case it hasn't been yet! I will also mark this thread as solved!

    Thanks comrade!

    ----------------------------------------------
    ALiVE_fnc_combatSupportAdd
    Will add CAS or Transport units to be available using the below command:
    ["CAS OR TRANSPORT",[SPAWN POS],Direction, "CLASS","CALLSIGN","CODE","HEIGHT"]] Call ALiVE_fnc_combatSupportAdd;

    examples
    ["TRANSPORT",[[1849.21,5805.27,0],60,"B_Heli_Transport_01_camo_F","VICTOR 1","",""]] Call ALiVE_fnc_combatSupportAdd;

    ["CAS",[[1849.21,5805.27,0],60,"B_Heli_Attack_01_F","Phantom 1","",""]] Call ALiVE_fnc_combatSupportAdd;

    ALiVE_fnc_combatSupportRemove
    Will remove a CAS or Transport unit from the available units for a specified side using the below command:

    ["SIDE","CAS or TRANSPORT","CALLSIGN"] Call ALiVE_fnc_combatSupportRemove;

    examples
    ["WEST","TRANSPORT","VICTOR 1"] Call ALiVE_fnc_combatSupportRemove;

    ["WEST","CAS","Phantom 1"] Call ALiVE_fnc_combatSupportRemove;
    ----------------------------------------------

  6. Added to wiki, yo

    http://alivemod.com/wiki/index.php/Script_Snippets#Adding_CAS_units_post-init

 

or Sign Up to reply!