Jump to content
Sign in to follow this  
pcc

How to remove duplicate weapon detected error

Recommended Posts

I'm trying to get rid of duplicate weapons detected msgs in warfare.  I've tried removeAllItems in the Common_EquipLoadout.sqf, but the error still persists for both west and east factions.

Duplicate weapon ItemMap detected for TK_Soldier_EP1
Duplicate weapon ItemCompass detected for TK_Soldier_EP1
Duplicate weapon ItemRadio detected for TK_Soldier_EP1

 

Share this post


Link to post
Share on other sites

Are you also getting these when just placing units in editor? Because there are entries about duplicates for some vanilla units in Arma 3 as well.

Share this post


Link to post
Share on other sites

See if this helps:

 

In Warfare, when an AI leader gets killed Common_ReplaceTeamMember.sqf runs and a team member takes on the leader role.

 

where it has:

RemoveAllWeapons _newUnit;

{_newUnit AddMagazine _x} ForEach Magazines _oldUnit;
{_newUnit AddWeapon _x} ForEach Weapons _oldUnit;

 

Change it to:

RemoveAllWeapons _newUnit;

// Remove items so they don't duplicate.
{
	if ((_x In (Items _newUnit))) then {_newUnit removeWeapon _x};
} ForEach ["ItemGPS","ItemMap","ItemCompass","ItemWatch","ItemRadio"];

{_newUnit AddMagazine _x} ForEach Magazines _oldUnit;
{_newUnit AddWeapon _x} ForEach Weapons _oldUnit;

 

It should cut down on the number of times the messages occur.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×