This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
unlimited's profile picture

1.3 to 1.4

Started by unlimited, 08 September 2012 - 11:28 AM
unlimited #1
Posted 08 September 2012 - 01:28 PM
Hi i have a code that stopped working and i can't figure out why

Spoilerx = 1
y = 1
z = 1

cx = 1
cy = 1
cz = 1

function f()
if turtle.forward() == false then
repeat
turtle.dig()
sleep(0.25)
until turtle.forward() == true
end
end

function loadpos()
local f1 = io.open("posx", "r")
local f2 = io.open("posy", "r")
posx = tonumber(f1:read())
posy = tonumber(f2:read())
f1:close()
f2:close()
end

function goback()
print("y - ",posy)
print("x - ",posx)
turtle.turnLeft()
while cx > x do
f()
cx = cx - 1
end
turtle.turnLeft()
while cy > y do
f()
cy = cy - 1
end
end

loadpos()
cx = posx
cy = posy
goback()

any of these codes were changed?

or is there any detailed change log so i can try to find the problem?
unlimited #2
Posted 08 September 2012 - 01:39 PM
loooool sry u can delete this topic, i forgot turtles had fuel now