generated from your-land/yl_template
your-land/yl_announcements#4 Fixes crash in chatcommand_say_all due to wrong return type
This commit is contained in:
parent
576c942d4d
commit
075454a57f
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user