Fixed incorrect return

This commit is contained in:
IT07 2016-04-11 16:12:29 +02:00
parent a45468f90d
commit 17aea31f9e

View File

@ -12,7 +12,7 @@
_this select 4: STRING - exact config name of mission _this select 4: STRING - exact config name of mission
Returns: Returns:
ARRAY format [UNITS,[groups],50cals] ARRAY format [[groups],[50cals]]
*/ */
private // Make sure that the vars in this function do not interfere with vars in the calling script private // Make sure that the vars in this function do not interfere with vars in the calling script
@ -90,7 +90,7 @@ if (count _pos isEqualTo 3) then
if not isNil"_groupSide" then if not isNil"_groupSide" then
{ {
_grp = createGroup _groupSide; _grp = createGroup _groupSide;
(_spawned select 1) pushBack _grp; (_spawned select 0) pushBack _grp;
}; };
if not isNil"_grp" then if not isNil"_grp" then
{ {
@ -124,7 +124,7 @@ if (count _pos isEqualTo 3) then
{ {
_hmg = createVehicle ["B_HMG_01_high_F", _spawnPos, [], 0, "CAN_COLLIDE"]; _hmg = createVehicle ["B_HMG_01_high_F", _spawnPos, [], 0, "CAN_COLLIDE"];
_hmg setVehicleLock "LOCKEDPLAYER"; _hmg setVehicleLock "LOCKEDPLAYER";
(_spawned select 2) pushBack _hmg; (_spawned select 1) pushBack _hmg;
}; };
}; };
}; };
@ -155,7 +155,6 @@ if (count _pos isEqualTo 3) then
}; };
_unit addMPEventHandler ["mpkilled","if (isDedicated) then { [_this select 0, _this select 1] spawn VEMFr_fnc_aiKilled }"]; _unit addMPEventHandler ["mpkilled","if (isDedicated) then { [_this select 0, _this select 1] spawn VEMFr_fnc_aiKilled }"];
(_spawned select 0) pushBack _unit;
// Set skills // Set skills
_unit setSkill ["aimingAccuracy", _accuracy]; _unit setSkill ["aimingAccuracy", _accuracy];
_unit setSkill ["aimingShake", _aimShake]; _unit setSkill ["aimingShake", _aimShake];
@ -170,11 +169,11 @@ if (count _pos isEqualTo 3) then
_unit setRank "Private"; // Set rank _unit setRank "Private"; // Set rank
}; };
_grp selectLeader _unit; // Leader Assignment _grp selectLeader _unit; // Leader Assignment
_invLoaded = [units _grp, _missionName, _mode] call VEMFr_fnc_loadInv; // Load the AI's inventory
_groups pushBack _grp; // Push it into the _groups array _groups pushBack _grp; // Push it into the _groups array
}; };
}; };
_invLoaded = [_spawned select 0, _missionName, _mode] call VEMFr_fnc_loadInv; // Load the AI's inventory
if isNil"_invLoaded" then if isNil"_invLoaded" then
{ {
["fn_spawnAI", 0, "failed to load AI's inventory..."] spawn VEMFr_fnc_log; ["fn_spawnAI", 0, "failed to load AI's inventory..."] spawn VEMFr_fnc_log;