Page MenuHomeFeedback Tracker

canAdd command not working as intended
Closed, ResolvedPublic

Description

This command seems to only check the space in 1 container instead of taking the maximum player's capacity (uniform + vest + backpack)

Details

Severity
Major
Resolution
Fixed
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

Place a civilian in 3den.
Start the simulation.
Drops everything on the ground
Execute this command :

player addUniform "U_C_Poloshirt_stripped";
player addVest "V_TacVest_blk_POLICE";
player addBackpack "B_AssaultPack_khk";

Now, execute this command :

_class = "10Rnd_762x51_Mag";
_count = 30;
hint format ["%1",player canAdd [_class,_count]];

It will return "False" (So it should means that you can't add 30 mags to the player's inventory)
But if you execute this :

_class = "10Rnd_762x51_Mag";
_count = 30;
for "_i" from 1 to _count do {
    player addMagazine _class;
};

It will add 30 mags successfully

Additional Information

Note : if _count = 20 the command will return true
And 20 is the ammount of mags i can store in my backpack

Event Timeline

reekoj created this task.Nov 24 2017, 1:23 PM
Wulf changed the task status from New to Reviewed.Nov 27 2017, 12:30 PM
Wulf added a subscriber: Wulf.

Hello.

Thank you for the report we will have a look at it.

dedmen claimed this task.Apr 10 2020, 4:22 PM
dedmen changed the task status from Reviewed to Assigned.
reekoj added a comment.Jun 8 2021, 1:27 PM

08/06/2021 - still happening on latest version

BIS_fnc_KK added a subscriber: dedmen.

should be fixed in 148800

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Feb 13 2022, 2:39 PM
BIS_fnc_KK changed the task status from Assigned to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
BIS_fnc_KK closed this task as Resolved.Jan 8 2024, 1:08 AM
BIS_fnc_KK changed Resolution from Open to Fixed.