Page MenuHomeFeedback Tracker

BIS_fnc_spawnGroup returns error and won't spawn the group when a group member has a string in its position config
New, NormalPublic

Description

BIS_fnc_spawnGroup returns an error in line 160 when try to do this:

[getPos player, blufor, (configFile >> "CfgGroups" >> "West" >> "VN_MACV" >> "vn_b_group_men_sog" >> "vn_b_group_men_sog_01")] call BIS_fnc_spawnGroup

16:34:21 Error position: <+ (_relPos select 1)];
}
else
{
_itemPos>
16:34:21 Error Generic error in expression
16:34:21 File A3\functions_f\spawning\fn_spawnGroup.sqf..., line 160

When the designated group has a string in an unit's position config e.g. (This one is from S.O.G. Prairie Fire CDLC):

getArray (configFile >> "CfgGroups" >> "West" >> "VN_MACV" >> "vn_b_group_men_sog" >> "vn_b_group_men_sog_01" >> "unit_1" >> "position")
// which returns [0,"(-1*5)",0]

Because this line 160 fails to calculate _relPos with _pos because tried to plus operation with a string and a number.

_itemPos = [(_pos select 0) + (_relPos select 0), (_pos select 1) + (_relPos select 1)];

This error can be avoided by add this line to line 160:

_relPos = _relPos apply {_x call BIS_fnc_parseNumber};

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. Launch Arma 3 with S.O.G. Prairie Fire CDLC
  2. Open Editor
  3. Open Debug Console
  4. Run this line:
[getPos player, blufor, (configFile >> "CfgGroups" >> "West" >> "VN_MACV" >> "vn_b_group_men_sog" >> "vn_b_group_men_sog_01")] call BIS_fnc_spawnGroup

Event Timeline

POLPOX created this task.May 31 2021, 9:43 AM
POLPOX edited Steps To Reproduce. (Show Details)
This comment was removed by LouMontana.