From e4a7af5858949ed786396abf0edd7f98c1e28941 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Tue, 10 Dec 2013 21:18:29 -0500 Subject: Better way to catch that incoming nil, return a real value on the way out --- autoplace_tubes.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'autoplace_tubes.lua') diff --git a/autoplace_tubes.lua b/autoplace_tubes.lua index f7f7eb7..4bb31bc 100644 --- a/autoplace_tubes.lua +++ b/autoplace_tubes.lua @@ -28,6 +28,8 @@ end --a function for determining which side of the node we are on local function nodeside(node, tubedir) + if not tubedir or not node or not node.param2 then return "back" end + --get a vector pointing back local backdir = minetest.facedir_to_dir(node.param2) -- cgit v1.2.3