This attribute code
if (!is3DEN && (_value # 0 != '')) then { [_this, _value] spawn { scriptName 'ENH_Attribute_GroupMarker'; params ['_group', '_value']; _value params ['_type', '_color', '_text', '_showGroupSize']; private _leader = leader _group; private _marker = createMarker [ format ['ENH_GroupMarker_%1', str _group], _leader ]; _marker setMarkerType _type; _marker setMarkerColor _color; _marker setMarkerText (_text call BIS_fnc_localize); while {true} do { sleep 1; if (units _group isEqualTo []) exitWith {deleteMarker _marker}; if (_group getVariable ['ENH_GroupMarker_Update', true]) then { _marker setMarkerPos _leader; if (_showGroupSize) then { _marker setMarkerText format ['%1 (%2)', groupId _group, count units _group]; }; }; }; }; };
is converted to
if (!is3DEN && (["","ColorWEST","Alpha 2-4",true] # 0 != '')) then { [_this, ["","ColorWEST","Alpha 2-4",true]] spawn { scriptName 'ENH_Attribute_GroupMarker'; params ['_group', '["","ColorWEST","Alpha 2-4",true]']; ["","ColorWEST","Alpha 2-4",true] params ['_type', '_color', '_text', '_showGroupSize']; private _leader = leader _group; private _marker = createMarker [format ['ENH_GroupMarker_["","ColorWEST","Alpha 2-4",true]', str _group], _leader]; _marker setMarkerType _type; _marker setMarkerColor _color; _marker setMarkerText (_text call BIS_fnc_localize); while {true} do { sleep 1; if (units _group isEqualTo []) exitWith {deleteMarker _marker}; if (_group getVariable ['ENH_GroupMarker_Update', true]) then { _marker setMarkerPos _leader; if (_showGroupSize) then { _marker setMarkerText format ['["","ColorWEST","Alpha 2-4",true] ()', groupId _group, count units _group]; }; }; }; }; };;
- %1 is replaced with the content of the _value variable which causes things like this:
createMarker [format ['ENH_GroupMarker_["","ColorWEST","Alpha 2-4",true]', str _group], _leader];
- _value variable is replaced by its content, even if it's used like this:
params ["_value"]; _value params ['_type', '_color', '_text', '_showGroupSize'];
which results in :
params ['_group', '["","ColorWEST","Alpha 2-4",true]']; ["","ColorWEST","Alpha 2-4",true] params ['_type', '_color', '_text', '_showGroupSize'];