Fix messages not showing

table.random picks a random element, not a random index.
This commit is contained in:
rubenwardy 2016-02-14 19:29:55 +00:00
parent 002f32c6ae
commit 010b2027c9

View File

@ -63,8 +63,9 @@ function random_messages.read_messages()
end
function random_messages.display_message(message_number)
if random_messages.messages[message_number] then
minetest.chat_send_all(random_messages.messages[message_number])
local msg = random_messages.messages[message_number] or message_number
if msg then
minetest.chat_send_all(msg)
end
end