mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 14:06:02 +01:00
Fix CodeM item slot check for metadata function
The slot data for CodeM apparently returns as a string, this fixes it trying to compare a string to a number
```lua
if v.name == item and v.slot <= lowestSlot then
```
to
```lua
if v.name == item and tonumber(v.slot) <= lowestSlot then
```
This commit is contained in:
@@ -473,8 +473,8 @@ function getDurability(item)
|
||||
if isStarted(CodeMInv) then
|
||||
local itemcheck = exports[CodeMInv]:GetClientPlayerInventory()
|
||||
for _, v in pairs(itemcheck) do
|
||||
if v.name == item and v.slot <= lowestSlot then
|
||||
lowestSlot = v.slot
|
||||
if v.name == item and tonumber(v.slot) <= lowestSlot then
|
||||
lowestSlot = tonumber(v.slot)
|
||||
durability = v.info and v.info.durability or nil
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user