aboutsummaryrefslogtreecommitdiff
path: root/builtin/game
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/game')
-rw-r--r--builtin/game/chat.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/game/chat.lua b/builtin/game/chat.lua
index b3edda0d2..a71f4b329 100644
--- a/builtin/game/chat.lua
+++ b/builtin/game/chat.lua
@@ -736,8 +736,9 @@ core.register_chatcommand("spawnentity", {
end
end
p.y = p.y + 1
- core.add_entity(p, entityname)
- return true, ("%q spawned."):format(entityname)
+ local obj = core.add_entity(p, entityname)
+ local msg = obj and "%q spawned." or "%q failed to spawn."
+ return true, msg:format(entityname)
end,
})