Fix nil spree message

* for sprees % 0, it would try to find and output a max spree while there isn't
This commit is contained in:
Timo Smit 2017-03-11 23:35:36 +01:00
parent d7217cfa88
commit 8b9bfd54a6

View file

@ -207,7 +207,7 @@ function sprees.onPlayerSpree(clientId, type, sourceId)
end end
local settingSpreeMessages = settings.get("g_spreeMessages") 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] local spreeMessage = spreeMessages[type][currentSpree]
if spreeMessage then if spreeMessage then