From 0ca3842b40a3687a066c178606bfc82a9b3804a9 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 14 Oct 2024 20:59:42 +0100 Subject: [PATCH] fix busted error --- worldeditadditions_core/core/safe_function.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldeditadditions_core/core/safe_function.lua b/worldeditadditions_core/core/safe_function.lua index d114dd2..a9b9d92 100644 --- a/worldeditadditions_core/core/safe_function.lua +++ b/worldeditadditions_core/core/safe_function.lua @@ -70,7 +70,7 @@ end -- @param string error_msg The error message to send when `fn` inevitably crashes. -- @param string|nil cmdname Optional. The name of the command being run. -- @returns bool,any,... A success bool (true == success), and then if success == true the rest of the arguments are the (unpacked) return values from the function called. If success == false, then the 2nd argument will be the stack trace. -function safe_function(fn, args, player_name, error_msg, cmdname) +local function safe_function(fn, args, player_name, error_msg, cmdname) local retvals local success_xpcall, stack_trace = xpcall(function() retvals = { fn(weac.table.unpack(args)) }