From 2fef5c9ec7f2b90aef672ea3e30913bc626cf619 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Sun, 3 Nov 2024 12:23:05 -0300 Subject: [PATCH] Using xpcall for events instead of pcall --- functions/events.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/events.lua b/functions/events.lua index 1fbcdb6bc..52b1e6e9f 100644 --- a/functions/events.lua +++ b/functions/events.lua @@ -254,7 +254,7 @@ local common_events = { return end - local okay, errortext = pcall(func, event, ...) + local okay, errortext = xpcall(func, geterrorhandler(), event, ...) if (not okay) then --trigger an error msg @@ -278,7 +278,7 @@ local common_events = { return end - local okay, errortext = pcall(func, context, event, ...) + local okay, errortext = xpcall(func, geterrorhandler(), context, event, ...) if (not okay) then --attempt to get the context name