diff --git a/mods/hudbars/init.lua b/mods/hudbars/init.lua index ee15f6cb..f53ea973 100755 --- a/mods/hudbars/init.lua +++ b/mods/hudbars/init.lua @@ -194,7 +194,7 @@ function hb.change_hudbar(player, identifier, new_value, new_max_value) max_changed = true end else - new_max_value = hudtable.hudstate[name].max + new_max_value = (hudtable.hudstate[name] or {max = 0}).max end local main_error_text = diff --git a/mods/warps/init.lua b/mods/warps/init.lua index b5d928f9..1f40fefa 100755 --- a/mods/warps/init.lua +++ b/mods/warps/init.lua @@ -46,7 +46,7 @@ do_warp_queue = function() local t = minetest.get_us_time() for i = table.getn(warps_queue),1,-1 do local e = warps_queue[i] - if e.p:getpos().x == e.pos.x and e.p:getpos().y == e.pos.y and e.p:getpos().z == e.pos.z then + if e and e.p and e.p:getpos() and e.p:getpos().x == e.pos.x and e.p:getpos().y == e.pos.y and e.p:getpos().z == e.pos.z then if t > e.t then warp(e.p, e.w) table.remove(warps_queue, i)