Page MenuHomeFeedback Tracker

handgunMagazine, primaryWeaponMagazine, and secondaryWeaponMagazine returning empty array
Closed, ResolvedPublic

Description

If you go into the editor, for example, and spawn a weapon (primary, secondary, or handgun) along with executing "<type>WeaponMagazine player;", you will receive an empty array. The problem seems to be that the command is locating the value from the inventory slot. The way to fix it is: 1. Spawn the weapon 2. Open then close Inventory 3. Execute magazine command. Only then will it return the correct value.

Details

Legacy ID
4034683503
Severity
None
Resolution
Unable To Duplicate
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. Spawn a weapon.
  2. SystemChat exectue the respective magazine command for "player". (primaryWeaponMagazine, secondaryWeaponMagazine, or handgunMagazine)
  3. Receive an empty array.

The work around:

  1. Spawn a weapon.
  2. Open and close your inventory.
  3. SystemChat exectue the respective magazine command for "player". (primaryWeaponMagazine, secondaryWeaponMagazine, or handgunMagazine)
  4. Receive an array with one value.
Additional Information

Please fix these commands! My script will not work until these are fixed!

Event Timeline

mistad edited Steps To Reproduce. (Show Details)Sep 15 2013, 7:46 PM
mistad edited Additional Information. (Show Details)
mistad set Category to Scripting.
mistad set Reproducibility to Always.
mistad set Severity to None.
mistad set Resolution to Unable To Duplicate.
mistad set Legacy ID to 4034683503.May 7 2016, 4:45 PM

how do you spawn a weapon?

He probably means adding it to the player inventory, but details would be appreciated.

Could you be please more specific about that weapon spawn? Thanks

I am not able to reproduce this with current repro. No reaction for 3 weeks, closing as unable to reproduce.

In case anyone will be able to reproduce this issue, please create a new bug with more precise repro steps. Thanks