your-land/yl_announcements#4 Fixes crash in chatcommand_say_all due to wrong return type

This commit is contained in:
AliasAlreadyTaken 2024-05-29 01:27:34 +02:00
parent 576c942d4d
commit 075454a57f
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ local chatcommand_definition = {
minetest.log("warning",
"[yl_announcements] player " .. name ..
" sent all announcements: " .. param ..
" unsuccessfully, message: " .. dump(message))
" unsuccessfully, message: " .. message)
return false, message
end
end

View File

@ -349,7 +349,7 @@ function yl_announcements.chatcommand_announcement_say_all(name, param) -- param
local success, data = yl_announcements.list()
if (success == false) then return false, data end
if (success == false) then return false, "No data" end
local n = 0
for _, announcement in pairs(data) do