Posted 04 October 2012 - 08:54 AM
Is there a way to get the number of the current slot that is selected in a turtle? I am trying to tell my turtle when he runs out of dirt then to go and find some more dirt. I am very new to this (a week and have just been using the wiki) and have looked everywhere.
I think it will work if I can change local x=2 to local x=thecurrentslot+1 but I cant work out how to get the current slot number. At the moment it works if I start at 1. No idea what it does if it gets to 17 lol but we will fix that when I get there, this will not work as it stands and I know that… I need to add a part where it doesn't use the last dirt so it has something to compare it to, but that is also something I will fix when I get there. All I want at the moment is to make this start at the current slot and not slot 2….
Also, is there a way to edit my codes that I write in minecraft with notepad++? I cannot seem to find them anywhere in my minecraft file.
Sorry if this is the wrong place to ask or it is not the right level, I am a complete noob and have spent three nights trying to solve this problem.
local x=2
function com()
for i = 1, x do
while not turtle.compareTo(x) do
x=x+1
end
turtle.select(x)
end
end
com()
I think it will work if I can change local x=2 to local x=thecurrentslot+1 but I cant work out how to get the current slot number. At the moment it works if I start at 1. No idea what it does if it gets to 17 lol but we will fix that when I get there, this will not work as it stands and I know that… I need to add a part where it doesn't use the last dirt so it has something to compare it to, but that is also something I will fix when I get there. All I want at the moment is to make this start at the current slot and not slot 2….
Also, is there a way to edit my codes that I write in minecraft with notepad++? I cannot seem to find them anywhere in my minecraft file.
Sorry if this is the wrong place to ask or it is not the right level, I am a complete noob and have spent three nights trying to solve this problem.