From 1623feacf1f93675c0aa1deae9a8132e6dde128d Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Mon, 5 May 2025 22:52:46 +0100 Subject: [PATCH] fix multicraft for qb-input side I forgot to correct the result as qb-input returns strings, this fixes that Also added a fallback for if the user deletes the value and tries to craft `nil` --- shared/crafting.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/crafting.lua b/shared/crafting.lua index 4b265e2..86d79f1 100644 --- a/shared/crafting.lua +++ b/shared/crafting.lua @@ -251,6 +251,10 @@ function multiCraft(data) end if Config.System.Menu == "qb" then + if dialog["amount"] == nil or dialog["amount"] == "" then + dialog["amount"] = 1 + end + dialog["amount"] = tonumber(dialog["amount"]) if dialog["amount"] > max or dialog["amount"] < 1 or dialog["amount"] == nil or dialog["amount"] == "" then triggerNotify(nil, "Invalid Amount", "error") craftingMenu(data)