Hey,
Today I am working on this script but I can't get it work.

Spoiler


x = 0
y = 0

chest = 0
rednet.open("right")

while x == 0 do
		turtle.select(9)
	while turtle.detect() do
		if turtle.compare() == true then
			chest = chest + 1
			turtle.up()
			turtle.forward()
			turtle.forward()
			turtle.down()
			y = 0
		else
			turtle.dig()
			turtle.forward()
			y = 0
		end
	end

	while y < 3 do
		turtle.forward()
		y = y + 1
	end

	if y == 3 then
		x = 1
	end

	rednet.send(1, chest.." Chests")

end


while x == 1 do
	turtle.select(9)
	while turtle.detect() do
		if turtle.compare() == true then
			turtle.up()
			turtle.forward()
			turtle.forward()
			turtle.down()
		end
	end

	while turtle.detect() == false do
		turtle.forward()
	end

end

rednet.send(1, "Done")



I am playing in a SkyGrid world so I want it to mine until it finds a chest or if inventory slot 8 gets a block in it.
Also it can go 3 blocks without mining. after that it needs to get back. (else it will fly out of the world :)/>/>)
I still need to code the inventory thing but thats not that hard to do.
Now if it finds a chest it goes over it and send a message to my other computer (this is working)

The problem is that if it gets to a block it won't mine it but if it gets to a chest it goes over it and tells my computer it found a chest.
First I didn't had this problem but the script to get it back wasn't working. Its still not working

Thanks