From 8b9bfd54a6dc4da83caf4a8bf595d1d38d55df65 Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Sat, 11 Mar 2017 23:35:36 +0100 Subject: [PATCH] Fix nil spree message * for sprees % 0, it would try to find and output a max spree while there isn't --- luamods/wolfadmin/game/sprees.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luamods/wolfadmin/game/sprees.lua b/luamods/wolfadmin/game/sprees.lua index c072bb6..0d6e47a 100644 --- a/luamods/wolfadmin/game/sprees.lua +++ b/luamods/wolfadmin/game/sprees.lua @@ -207,7 +207,7 @@ function sprees.onPlayerSpree(clientId, type, sourceId) end local settingSpreeMessages = settings.get("g_spreeMessages") - if settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^type) then + if settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^type) and #spreeMessagesByType[type] > 0 then local spreeMessage = spreeMessages[type][currentSpree] if spreeMessage then