forked from overextended/ox_inventory
-
-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Getting a nil value error when syncInventory is called during server restart/shutdown period.
Error Message
@ox_inventory/modules/bridge/esx/server.lua:56: attempt to index a nil value (local 'player')
Steps to Reproduce
Wait until server restart is approaching (1-5 minutes before restart)
Trigger inventory save operation (e.g., /saveinv command)
Error is thrown in console
Framework: ESX
Code Location
File: ox_inventory/modules/bridge/esx/server.lua
Line: 56
local accounts = Inventory.GetAccountItemCounts(inv)
if accounts then
local player = server.GetPlayerFromId(inv.id)
player.syncInventory(inv.weight, inv.maxWeight, inv.items, accounts)
-- ^ Error occurs here when player is nil
end
end```
<img width="1233" height="94" alt="Image" src="https://github.com/user-attachments/assets/e925fe85-df4d-47c7-a260-8a99f6975810" />
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working