Page MenuHomeFeedback Tracker

['AmmoboxInit',[_this,true]] spawn BIS_fnc_arsenal creates a warning message
Closed, ResolvedPublic

Description

Spawning the Arsenal with ['AmmoboxInit',[_this,true]] spawn BIS_fnc_arsenal causes a warning message to pop up at the bottom of the screen. (See screenshot)

The warning message should be removed because it's obsolete and annoying, additionally it's the official way to spawn a full Arsenal see: https://community.bistudio.com/wiki/Arsenal#Virtual_Ammo_Box

Details

Severity
Tweak
Resolution
Duplicate
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. Preview a mission in the editor with a place player unit
  2. Execute 0 = ["AmmoboxInit",[player,true]] spawn BIS_fnc_arsenal; in the debug console
  3. Open the Arsenal via the action menu
Additional Information

Event Timeline

R3vo created this task.May 26 2016, 9:00 PM
R3vo edited Additional Information. (Show Details)
ImperialAlex added a subscriber: ImperialAlex.EditedJun 1 2016, 10:56 AM

This is caused by two things:

  • the arsenal uses "%ALL" as a magic string in the whitelists to mean "every item is whitelisted" (this is seperate from the 'full' mode that you get with ["Open",true] spawn bis_fnc_arsenal)
  • If the whitelist contains a 'composite' weapon classname like "arifle_MX_pointer_F" this is converted to the base weapon (arifle_MX_F) and the attachments via bis_fnc_baseWeapon

Combine this and you get the following behaviour: Each entry in the weapons white-list is 'base-weaponified'. "bis_fnc_baseWeapon" does its work by looking up the config property "baseWeapon", however in order to do this it first needs to find the actual config. "%ALL" is obviously not a valid class inside CfgWeapons so bis_fnc_baseWeapon throws the error.

Since the presence of "%ALL" is already checked at some point in the whitelist parsing, the fix here would be to make sure that if the list contains "%ALL" the entire baseWeaponify logic is skipped. However it's a single RPT entry that doesn't cause any harm so it might just not be worth the effort to fix it :)

EDIT: Also seems like this is a duplicate of T78096

razazel closed this task as Resolved.Jun 2 2016, 12:53 PM
razazel changed Resolution from Open to Duplicate.