More helpful error messages

This commit is contained in:
Alden Peeters 2019-09-18 16:52:14 -04:00
parent 38dfc451e5
commit 807cb6400e
No known key found for this signature in database
GPG Key ID: CDAD63AE9DA934BE

@ -87,8 +87,7 @@ local function handle_command(name, param)
table.insert(params, p) table.insert(params, p)
end end
if params == nil then if params == nil then
minetest.chat_send_player(name, S("Unknown subcommand")) minetest.chat_send_player(name, S("Unknown subcommand. Run '/help factions' for help"))
return false
end end
local action = params[1] local action = params[1]
if action == "create" then if action == "create" then
@ -222,6 +221,8 @@ local function handle_command(name, param)
minetest.chat_send_player(name, S("Ownership has been transferred to @1", target)) minetest.chat_send_player(name, S("Ownership has been transferred to @1", target))
return true return true
end end
else
minetest.chat_send_player(name, S("Unknown subcommand. Run '/help factions' for help"))
end end
return false return false
end end