From be7441143a74fc0321c4c87d1e6c54e7016f975f Mon Sep 17 00:00:00 2001 From: Robbie Ferguson Date: Tue, 10 May 2016 13:58:24 -0400 Subject: [PATCH] Update init.lua --- init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 7d9fcd8..044ea48 100644 --- a/init.lua +++ b/init.lua @@ -71,10 +71,12 @@ local function tpc_send(player,coordinates) minetest.chat_send_player(pname, "Usage: /tpc ") return nil end - - posx = tonumber(posx) + 0.0 - posy = tonumber(posy) + 0.0 - posz = tonumber(posz) + 0.0 + + if posx ~= nil or posy ~= nil or posz ~= nil then + posx = tonumber(posx) + 0.0 + posy = tonumber(posy) + 0.0 + posz = tonumber(posz) + 0.0 + end if posx > 32765 or posx < -32765 or posy > 32765 or posy < -32765 or posz > 32765 or posz < -32765 then minetest.chat_send_player(pname, "Error: Invalid coordinates.")