Skip to content

Glovebox and Trunk saving issue #5

@tony-stark-17

Description

@tony-stark-17

Describe the bug
There occurs a bug where when you place your items in the glovebox or the trunk and when the vehicle gets deleted and then when you check the inventory the items are lost. i.e. the previous items will be there but the new one's will be gone. The thing is it doesn't happen always

Framework
Should happen on All (Tested on QBOX )

Resource version
2.44.0

To Reproduce
Steps to reproduce the behavior:

  1. Save items in glovebox
  2. Delete vehicle
  3. Take the vehicle
  4. Items lost

Expected behavior
The items should be saved in the inventory.

Additional context

Image
Upon debugging I found that on deleting the vehicle when the saveInventories functions (modules/inventory/server.lua) is called the Inventory.Remove() is being called as the vehicle netId doesn't match with 0. Since the entity got deleted. As a workaround I added a check whether ~=0 and not matching then remove. But not 100% confident about this workaround which is why didn't create a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions