mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +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
|
if isStarted(CodeMInv) then
|
||||||
local itemcheck = exports[CodeMInv]:GetClientPlayerInventory()
|
local itemcheck = exports[CodeMInv]:GetClientPlayerInventory()
|
||||||
for _, v in pairs(itemcheck) do
|
for _, v in pairs(itemcheck) do
|
||||||
if v.name == item and v.slot <= lowestSlot then
|
if v.name == item and tonumber(v.slot) <= lowestSlot then
|
||||||
lowestSlot = v.slot
|
lowestSlot = tonumber(v.slot)
|
||||||
durability = v.info and v.info.durability or nil
|
durability = v.info and v.info.durability or nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user