1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 15:10:23 +02:00

Update misc.lua

Little snippet from sfan5 to help identify problem mods that crash the server when nil is sent through the after function
This commit is contained in:
Ryan
2014-04-13 11:52:58 +01:00
parent af01a9577e
commit 597a9857c4

View File

@ -21,6 +21,10 @@ minetest.register_globalstep(function(dtime)
end)
function minetest.after(time, func, ...)
-- Little snippet from sfan5 to help identify problem mods that crash the server when nil is sent through the after function
if time == nil or func == nil then
minetest.log("ERROR", "invalid minetest.after call by "..minetest.get_current_modname())
end
table.insert(minetest.timers_to_add, {time=time, func=func, args={...}})
end