Fix crash upon invoking /maps_reload (#486)
This commit is contained in:
parent
f364e73707
commit
680dd4c87c
1 changed files with 10 additions and 1 deletions
|
@ -244,7 +244,16 @@ minetest.register_chatcommand("maps_reload", {
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local maps = load_maps()
|
local maps = load_maps()
|
||||||
next_idx = nil
|
next_idx = nil
|
||||||
return true, #maps .. " maps found: " .. table.concat(maps, ", ")
|
|
||||||
|
local ret = #maps .. " maps found:\n"
|
||||||
|
for i = 1, #maps do
|
||||||
|
ret = ret .. " * " .. ctf_map.available_maps[i].name
|
||||||
|
if i ~= #maps then
|
||||||
|
ret = ret .. "\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true, ret
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue