diff --git a/init.lua b/init.lua index 43f7be0..b9d424c 100644 --- a/init.lua +++ b/init.lua @@ -104,7 +104,8 @@ end) local get_ambience = function(player, tod, name) -- play server or local music if music enabled and music not already playing - if play_music and MUSICVOLUME > 0 and playing[name].music < 0 then + if play_music and MUSICVOLUME > 0 + and playing[name] and playing[name].music < 0 then -- count backwards playing[name].music = playing[name].music -1