mirror of
https://github.com/mt-mods/playerfactions.git
synced 2024-11-22 15:23:47 +01:00
More helpful error messages
This commit is contained in:
parent
38dfc451e5
commit
807cb6400e
5
init.lua
5
init.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user