Make errors from IO be properly printed

This commit is contained in:
osmarks 2018-08-15 18:14:02 +01:00
parent b72644dc5f
commit c360c72f83

7
IO.lua
View File

@ -18,7 +18,8 @@ local function get_num_stacks(total_items)
return math.ceil(total_items / 64)
end
while true do
local function main()
while true do
local stacks_stored = d.map(d.filter(chest.list(), function(x) return x ~= nil end), w.to_wyvern_item)
local items_stored = w.collate_stacks(stacks_stored)
@ -53,4 +54,8 @@ while true do
end
sleep(conf.sleep_time)
end
end
local ok, err = pcall(main)
print(w.errors.format(err))