forked from Simnation/Main
ed
This commit is contained in:
parent
330458a574
commit
a2feb8b80a
1 changed files with 6 additions and 0 deletions
|
@ -124,6 +124,12 @@ function ConsumeItem(name)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if uses is nil and provide a default
|
||||||
|
if uses == nil then
|
||||||
|
print("^1WARNING: Server returned nil for uses. Defaulting to 0.^0")
|
||||||
|
uses = 0
|
||||||
|
end
|
||||||
|
|
||||||
ItemData.uses = uses
|
ItemData.uses = uses
|
||||||
if uses < 1 then
|
if uses < 1 then
|
||||||
return RemoveItem()
|
return RemoveItem()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue