mirror of
https://github.com/arsdragonfly/random_messages.git
synced 2025-01-09 09:20:26 +01:00
Fix messages not showing
table.random picks a random element, not a random index.
This commit is contained in:
parent
002f32c6ae
commit
010b2027c9
5
init.lua
5
init.lua
@ -63,8 +63,9 @@ function random_messages.read_messages()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function random_messages.display_message(message_number)
|
function random_messages.display_message(message_number)
|
||||||
if random_messages.messages[message_number] then
|
local msg = random_messages.messages[message_number] or message_number
|
||||||
minetest.chat_send_all(random_messages.messages[message_number])
|
if msg then
|
||||||
|
minetest.chat_send_all(msg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user