Posted 18 August 2016 - 09:02 AM
I basically want to "pause" the program till the right amount of items are in the right slots.
So this is an example of what im currently using(Im pretty sure everyone whos somewhat decent at coding while facepalm himself after seeing my attempt. lol)
And well.. it looks retarded but it works. sort of.
How can I get it to print if there are wrong amount of items in a specific slot?
just adding "elseif" below the turtle.getItemCount lines will just fuck up the code and will stop it from working
Oh, and whats the symbol for "unequal to"? The wiki says its "~=" but it doesnt seem to understand it neither does just "~" work
And one more, can I create a function to easy it out what to.. for example select? I mean that you could write
So this is an example of what im currently using(Im pretty sure everyone whos somewhat decent at coding while facepalm himself after seeing my attempt. lol)
print("20 items in slot 1")
print("10 items in slot 2")
while true do
event, key = os.pullEvent("key")
if key == 28 then
if turtle.getItemCount(1) == 20 then
if turtle.getItemCount(2) == 10 then
break()
end
end
end
And well.. it looks retarded but it works. sort of.
How can I get it to print if there are wrong amount of items in a specific slot?
just adding "elseif" below the turtle.getItemCount lines will just fuck up the code and will stop it from working
Oh, and whats the symbol for "unequal to"? The wiki says its "~=" but it doesnt seem to understand it neither does just "~" work
And one more, can I create a function to easy it out what to.. for example select? I mean that you could write
select(5)
so it takes the number between the () as a variable and puts it in individually in to your function?
local function select()
turtle.select(x) --- And puts it in there individually
end
Edited on 18 August 2016 - 07:13 AM