mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 14:23:16 -04:00
Consistent error messages
This commit is contained in:
parent
dc845b9f3e
commit
44dd4d00dc
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ end
|
||||||
sethome.get = function(name)
|
sethome.get = function(name)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
if not player then
|
if not player then
|
||||||
return nil
|
return false, S("This command can only be executed in-game!")
|
||||||
end
|
end
|
||||||
local player_meta = player:get_meta()
|
local player_meta = player:get_meta()
|
||||||
local pos = minetest.string_to_pos(player_meta:get_string("sethome:home"))
|
local pos = minetest.string_to_pos(player_meta:get_string("sethome:home"))
|
||||||
|
@ -91,7 +91,7 @@ minetest.register_chatcommand("home", {
|
||||||
func = function(name)
|
func = function(name)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
if not player then
|
if not player then
|
||||||
return false, S("This command can be executed in-game only!")
|
return false, S("This command can only be executed in-game!")
|
||||||
end
|
end
|
||||||
if sethome.go(name) then
|
if sethome.go(name) then
|
||||||
return true, S("Teleported to home!")
|
return true, S("Teleported to home!")
|
||||||
|
|
Loading…
Add table
Reference in a new issue