Page MenuHomeFeedback Tracker

BIS_fnc_spawnGroup returns error while randomizing units
New, WishlistPublic

Description

Hello, Not sure it's a bug but there is probably missing params in your BIS_fnc_spawnGroup to avoid such error messages from fn_spawnGroup.sqf:

11:04:20 Error in expression <1)];
}
else
{
_itemPos = _pos;
};

if (_isMan) then
{
_unit = _grp createUnit [>
11:04:20 Error position: <_isMan) then
{
_unit = _grp createUnit [>
11:04:20 Error Undefined variable in expression: _isman
11:04:20 File A3\functions_f\spawning\fn_spawnGroup.sqf, line 168
11:04:20 Error in expression <etNumber(configFile >> "CfgVehicles" >> _type >> "isMan") == 1;

if !(_isMan) th>
11:04:20 Error position: <_type >> "isMan") == 1;

if !(_isMan) th>
11:04:20 Error Undefined variable in expression: _type
11:04:20 File A3\functions_f\spawning\fn_spawnGroup.sqf, line 128

Details

Legacy ID
3749486319
Severity
None
Resolution
Open
Reproducibility
Sometimes
Category
Scripting
Steps To Reproduce

I tried (and that works) to randomize units in spawning group, number and type. CUP units are from configVehicle with CUP vehicle addon:

_redmen = ["CUP_O_TK_Soldier","CUP_O_TK_Soldier_AR","CUP_O_TK_Soldier_GL","CUP_O_TK_Soldier_AMG","CUP_O_TK_Soldier_MG","CUP_O_TK_Soldier_HAT","CUP_O_TK_Medic"];
_redprepare = ["CUP_O_TK_Commander","CUP_O_TK_Officer"];

    _nbr = (floor random 7) max 2;
 	for "_i" from 1 to _nbr do {
       _redprepare pushback (_redmen select floor random 7)};
    _redteam = [_pos, east, _redprepare, [], [], [], [], [], 0] call BIS_fnc_spawnGroup;
Additional Information

Perhaps, i missed something with my script, but the rpt error is on your sqf. I have no idea to correct this kind of error. Thanks

Event Timeline

PiepMGI edited Steps To Reproduce. (Show Details)Nov 20 2015, 10:29 PM
PiepMGI edited Additional Information. (Show Details)
PiepMGI set Category to Scripting.
PiepMGI set Reproducibility to Sometimes.
PiepMGI set Severity to None.
PiepMGI set Resolution to Open.
PiepMGI set Legacy ID to 3749486319.May 8 2016, 1:07 PM