From f4e70557d31ad9811a46e19e29afc93cbc3e571d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 14 Feb 2016 19:28:45 +0000 Subject: [PATCH] Fix random_messages bug --- .gitignore | 1 + mods/random_messages/init.lua | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 717f5fe..a2fb451 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *bak* tags *.vim +debug.txt ## Files related to minetest development cycle *.patch diff --git a/mods/random_messages/init.lua b/mods/random_messages/init.lua index 317e867..d3a3871 100644 --- a/mods/random_messages/init.lua +++ b/mods/random_messages/init.lua @@ -64,8 +64,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