Posted 10 October 2013 - 09:46 AM
Hello Pro's! :)/>
im makeing a turtle aka computer shop, right now at the moment im working on the turtle only, and it kinda works sometimes.. but mostly not ..
i was hopeing you could tell me my error here :P/>
link: http://pastebin.com/N2ZYCeLs
The error is that, it keeps saying "Error Wrong item." and, the item is gold and it should return true :S and execute one of the actions,
could you help me, then i will appreciate it alot!, thanks in advance!
Regards Plazter
im makeing a turtle aka computer shop, right now at the moment im working on the turtle only, and it kinda works sometimes.. but mostly not ..
i was hopeing you could tell me my error here :P/>
link: http://pastebin.com/N2ZYCeLs
Spoiler
rednet.open("right")
local item = turtle.getItemCount(1)
local comp = turtle.compareTo(16)
function ok()
local id, msg = rednet.receive()
if id == 177 then
if msg == "ok" then
turtle.select(1)
run()
end
end
end
function run()
turtle.suckDown()
if comp == true then
if item < 32 then
print("lower")
turtle.dropDown()
elseif item > 32 then
print("over")
turtle.transferTo(2,32)
turtle.dropDown()
turtle.select(2)
turtle.dropUp()
elseif item == 32 then
print("equal")
turtle.dropUp()
end
else
print("Error Wrong item.")
turtle.dropDown()
end
end
run()
while true do
ok()
sleep(1)
end
The error is that, it keeps saying "Error Wrong item." and, the item is gold and it should return true :S and execute one of the actions,
could you help me, then i will appreciate it alot!, thanks in advance!
Regards Plazter