diff --git a/inventoryManager.lua b/inventoryManager.lua index 9ff2847..ffa2cca 100644 --- a/inventoryManager.lua +++ b/inventoryManager.lua @@ -3213,7 +3213,12 @@ local function main() pcall(broadcastState) elseif message.type == "craft" and message.recipeIdx then print(string.format("[NET] Craft request: recipe #%d", message.recipeIdx)) - local ok, err = craftItem(message.recipeIdx) + local pok, ok, err = pcall(craftItem, message.recipeIdx) + if not pok then + print("[NET] craftItem crashed: " .. tostring(ok)) + err = tostring(ok) + ok = false + end networkModem.transmit(replyChannel, ORDER_CHANNEL, { type = "craft_result", success = ok,