DerZade / BackpackOnChest

BackpackOnChest is a mod, which adds the functionality of carrying an extra backpack on your chest.
11 stars 10 forks source link

Dupe of backpack and error occurs if it contains weapons #42

Open severgun opened 5 years ago

severgun commented 5 years ago

Take backpack. Put pistol/rifle/launcher in it and try to swap. Error will pop up and second backpack appears.

12:35:55 Error >>: Type Array, expected String 12:35:55 File \zade_boc\functions\commands\fncanAddItemToChestpack.sqf [zade..., line 24 12:35:55 Error in expression <0; if (isClass (configFile>>"CfgWeapons">> _item >> "ItemInfo")) then { _itemMas> 12:35:55 Error position: <>> _item >> "ItemInfo")) then { _itemMas> 12:35:55 File \zade_boc\functions\commands\fncanAddItemToChestpack.sqf [zade..., line 24

Secondary muzzle mags now return [] even if no mags exist. So it should be handled as regular mags.

P.S. There is also new command introduced in 1.94 https://community.bistudio.com/wiki/addWeaponWithAttachmentsCargoGlobal

DerZade commented 5 years ago

Thanks a lot for the report. I'll try to reproduce it but I'm a little bit short on time atm.

A refactor (including this new command) is already in the works.

MystLeissa commented 4 years ago

Although the Error isn't occuring for me duping seems to happen specifically with the Field Pack (Black) in ACE. Doesn't happen with the other colors/variants.

markooff commented 3 years ago

Hello,

I've found the same problem , but even without putting a weapon to the backpack . For instance this can happen with such loadout :

[loadout - taken using ACE Arsenal Export function]

[["rhs_weap_m4a1_blockII_wd","","","rhsusf_acc_su230",["rhs_mag_30Rnd_556x45_M855A1_PMAG",30],[],""],[],["rhsusf_weap_glock17g4","rhsusf_acc_omega9k","acc_flashlight_pistol","",["rhsusf_mag_17Rnd_9x19_JHP",17],[],""],["U_BG_Guerrilla_6_1",[["ACE_fieldDressing",10],["ACE_EarPlugs",1],["ACE_epinephrine",1],["ACE_IR_Strobe_Item",1],["ACE_MapTools",1],["ACE_Flashlight_XL50",1],["ACE_microDAGR",1],["ACE_splint",2],["ACE_tourniquet",4],["ACE_morphine",3]]],["V_PlateCarrier2_rgr",[["ACE_elasticBandage",10],["ACE_IR_Strobe_Item",2],["rhsusf_mag_17Rnd_9x19_FMJ",2,17],["rhs_mag_30Rnd_556x45_M855A1_Stanag",2,30],["SmokeShellBlue",2,1],["SmokeShellRed",2,1],["SmokeShell",4,1],["ACE_Chemlight_UltraHiOrange",2,1],["ACE_Chemlight_IR",2,1],["HandGrenade",2,1],["ACE_HandFlare_Green",2,1]]],["B_Kitbag_sgg",[["G_Aviator",1],["ACE_NVG_Wide",1],["H_Cap_headphones",1],["Laserbatteries",1,1],["rhsusf_mag_17Rnd_9x19_FMJ",2,17],["rhs_mag_30Rnd_556x45_M855A1_Stanag",4,30],[["Laserdesignator_03","","","",[],[],""],1]]],"H_Cap_oli","rhsusf_shemagh_od",["ACE_Vector","","","",[],[],""],["ItemMap","B_UavTerminal","TFAR_anprc152_5","ItemCompass","ItemWatch",""]]

[/loadout end]

as You can see - I have no weapon in my backpack . The set is a combination of Arma3 basic + TFAR + RHS + Project Opfor things. And it still can produce duplicated backpack - when I try to use "BackpackOnChest" functionality. Other very ismiliar sets (also conbined with these mods) don't produce such effect .

Best regards

SCREENS: https://markooff.net/obrazki/PGM/bledy_army_ACE_itp/backpackOnChest/Arma3_x64_2021-05-22_03-28-34-75.jpg https://markooff.net/obrazki/PGM/bledy_army_ACE_itp/backpackOnChest/Arma3_x64_2021-05-22_03-42-31-45.jpg