From de2b2995f3f31183c471603de7fd2293b5c83e3a Mon Sep 17 00:00:00 2001 From: Dominic Zimmer Date: Sat, 4 Jul 2020 12:56:17 +0200 Subject: [PATCH] Update pairing.lua --- dominic/pairing.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dominic/pairing.lua b/dominic/pairing.lua index c0e1fd0..d2508e1 100644 --- a/dominic/pairing.lua +++ b/dominic/pairing.lua @@ -1,3 +1,5 @@ +args = {...} + function pair(x, y) return math.floor((x + y) * (x + y + 1)/2 + y) end @@ -49,6 +51,7 @@ function digTo(x, z) turtle.digUp() x = x - 1 end +end function digSpot(i) x, z = ithSpot(i) @@ -57,7 +60,6 @@ function digSpot(i) turtle.down() end -args = {...} spotnum = tonumber(args[1]) if spotnum then digSpot(spotNum)