Update init.lua

This commit is contained in:
Robbie Ferguson 2016-05-10 13:58:24 -04:00
parent 664b03135c
commit be7441143a

@ -71,10 +71,12 @@ local function tpc_send(player,coordinates)
minetest.chat_send_player(pname, "Usage: /tpc <x,y,z>") minetest.chat_send_player(pname, "Usage: /tpc <x,y,z>")
return nil return nil
end end
posx = tonumber(posx) + 0.0 if posx ~= nil or posy ~= nil or posz ~= nil then
posy = tonumber(posy) + 0.0 posx = tonumber(posx) + 0.0
posz = tonumber(posz) + 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 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.") minetest.chat_send_player(pname, "Error: Invalid coordinates.")