address lua warning where id could be `nil

This commit is contained in:
2025-10-03 15:02:09 -04:00
parent 74745108b6
commit 7db1fc75a9

View File

@@ -536,6 +536,9 @@ function bl.schedule(time, cb, ...)
end
function _bllua_schedule_callback(id)
id = tonumber(id)
if id == nil then
error('_ts_schedule_callback: invalid id')
end
local sch = bl._scheduleTable[id]
if not sch then error('_ts_schedule_callback: no schedule with id '..id) end
bl._scheduleTable[id] = nil