Skip to content

Commit 2dfd1ce

Browse files
committed
update(timers): NextTick better error handling
1 parent d028f07 commit 2dfd1ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugin_files/bin/scripting/timers.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ AddEventHandler("OnGameTick", function(event, simulating, first, last)
1313
nextTickFunctions = {}
1414

1515
for i = 1, #nexttickCopy do
16-
nexttickCopy[i]()
16+
local status, err = pcall(nexttickCopy[i])
17+
if not status then
18+
print("An error has been occured while trying to execute NextTick.\nError: "..err)
19+
end
1720
end
1821

1922
for i = 1, timerstblsize do

0 commit comments

Comments
 (0)