mirror of
https://github.com/OgelGames/fakelib.git
synced 2024-11-13 23:40:17 +01:00
check list size is greater than zero
This commit is contained in:
parent
8f16ad9dd9
commit
3094965807
|
@ -19,7 +19,7 @@ function fakelib.create_inventory(sizes)
|
|||
local lists = {}
|
||||
if type(sizes) == "table" then
|
||||
for listname, size in pairs(sizes) do
|
||||
if type(listname) == "string" and type(size) == "number" then
|
||||
if type(listname) == "string" and type(size) == "number" and size > 0 then
|
||||
local list = {}
|
||||
for i=1, size do
|
||||
list[i] = ItemStack()
|
||||
|
|
Loading…
Reference in New Issue
Block a user