diff --git a/minehost.lua b/minehost.lua index 7448a37..9d545ae 100644 --- a/minehost.lua +++ b/minehost.lua @@ -101,8 +101,8 @@ local function handleMessage(sender, type, data) if type == LOG then print("[" .. sender .. "]: " .. data["log"] .. ": " .. (data["content"]["n"] >= 1 and tostring(data["content"][1]) or "")) if data["log"] == STATUS then - print("Relative position: " .. tostring(data["content"][1]["relative_position"]["coordinates"])) - print("Position" .. tostring(data["content"][1]["position"]["coordinates"])) + print("Relative position: " .. data["content"][1]["relative_position"]["coordinates"]) + print("Position: " .. (data["content"][1]["position"]["coordinates"] and data["content"][1]["position"]["coordinates"] or "not positioned.")) print("fuel: " .. tostring(data["content"][1]["fuel"])) print("current task: " .. data["content"][1]["task"]) end