Page MenuHomeFeedback Tracker

Removing all magazines of one type and re-adding the same magazine will generate one too many
Assigned, WishlistPublic

Description

If you enter this on the console, all Chemlight_blue are removed from the players inventory:

player removeMagazines "Chemlight_blue";

However, after executing this code:
player removeMagazines "Chemlight_blue"; player addMagazines ["Chemlight_blue", 3]

The player should have 3 Chemlight_blue, but gets 4.

To make matters worse:
player removeMagazines "Chemlight_blue"; player addMagazines ["Chemlight_green", 3]

The player ends up with 3 green chemlights.

Details

Legacy ID
835591289
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting

Event Timeline

Varanon edited Steps To Reproduce. (Show Details)Feb 8 2014, 1:42 AM
Varanon edited Additional Information. (Show Details)
Varanon set Category to Scripting.
Varanon set Reproducibility to Always.
Varanon set Severity to None.
Varanon set Resolution to Open.
Varanon set Legacy ID to 835591289.May 7 2016, 5:54 PM

I can confirm, what a funny bug.

It seems if you run addmagazine command for the first time it works as intended, any subsequent use adds +1 mag. Just do this, so you have time open inventory and see it happening in front of your eyes :)

  • spawn {

sleep 3;
player removeMagazines "Chemlight_blue";
sleep 3;
player addMagazines ["Chemlight_blue", 3];
};

1st time it adds 3 lights and then always 4, it is like there is a buffer or something that doesn't get cleared.

Jrog added a subscriber: Jrog.May 7 2016, 5:54 PM
Jrog added a comment.Nov 15 2014, 4:20 PM

Same here. Happens when the addMagazine command is run for the first time. Relates to chemlights and smokes.

ECID added a subscriber: ECID.May 7 2016, 5:54 PM
ECID added a comment.Nov 15 2014, 5:29 PM

can confirm this as still happening.

You buy white smoke grenade you get 2 of em.
You clear inventory

Yo buy 1 white smoke and 1 red smoke:
you get 2 white and 2 reds

you buy 1 white smoke, a red smoke and a IR grenade, a chemlight, one of each magazine.
You get 2 white smokes, 2 red smokes, 2 chemlight, 1 IR grenade, 1 of each magazines.

So this is what had me very confused the other day. Yeah, can also confirm it still happens.

Varanon added a subscriber: Varanon.May 7 2016, 5:54 PM

Note: This bug report is still valid