Posted 21 October 2014 - 12:08 AM
I am trying to create a program that the turtle select a slot and print the word so here the code.
rednet.open("right")
function mob()
local mob = {skeleton = 1, cow = 2, pig = 3}
turtle.select(mob)
end
function display()
local id, msg = rednet.receive()
if msg == "Hi" then
print("Hello")
elseif msg ~= "Hi" then
print(msg)
else
mob()
end
while true do
display()
end
Also this is just a test code but still very important to me.Edited on 20 October 2014 - 11:12 PM