Posted 21 December 2012 - 02:24 PM
Something is wrong can you fix it please?
function Menu()
print("**********WantedLab**********")
print("* *")
print("* *")
print("* ObsidianGenerator *")
print("* V2 *")
print("* *")
print("* *")
print("**********WantedLab**********")
print("")
print("How many stacks do you have of redstone?")
stacks = read()
x = stacks
if "x" >= "16" then
print("You cant have more than 15 stacks of redstone")
Cleanall()
Menu()
end
print("Please confirm if you got obsidian in slot n16.")
print("Ready to start?")
write("=> ")
ready = io.read():lower()
if ready == "yes" then
print("Starting")
searchforcleanspaces()
elseif ready == "no" then
print("Your awnser is no")
else
print("Wrong choice")
end
end -- End da funcao
function Cleanall()
term.clear()
term.setCursorPos(1,1)
end -- End da funcao
function searchforcleanspaces()
print("Searching for empty slots")
y = 1
z = 0
for z=1,16 do
turtle.select(y)
if turtle.getItemCount(y) == 0 then
z=z+1
y=y+1
else
y=y+1
end
end
print("Quantity of empty slots")
print(z)
y=1
turtle.select(y)
end -- End da funcao
-- Menu
Cleanall()
Menu()
-- Meaning
-- x = stacks
-- y = slot
-- z = number of empty slots