This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
BlueZu's profile picture

[Question][Lua] turtle.compare() function dodgging from slot to another.

Started by BlueZu, 24 February 2013 - 07:27 AM
BlueZu #1
Posted 24 February 2013 - 08:27 AM
Title: [Question][Lua] turtle.compare() function dodgging from slot to another.

I've been trying all day to solve this and i still didn't fix it. This is Fir Sappling farm. How it should works:
Place your sapplings on slot 1.
Place your bonemeal on slot 2.
Place Fir log on slot 16.
And a chest behind the turtle.
Place an 2x2 fir tree and run the program.

Also this is a pastebin of 2 streamers & youtubers modificated. Not my own.

The problem is that it farms the first tree that i've planted and when it cames down it place the fir sapplings on the right spot and it applys the bonemeal correcltly
Then, it turns and put the logs that it has got into the chest, after it turns again facechecking the tree and it keeps changing the slots select 2 and 16 forever…

Pastebin: http://pastebin.com/xzkTU3iz
Lyqyd #2
Posted 24 February 2013 - 04:39 PM
Is it possible that generated fir logs and cut fir logs have different metadata? That would cause the comparison to fail.
BlueZu #3
Posted 24 February 2013 - 09:16 PM
Might be.. I'm still learning but that compare function it's a bit rare for me. I think all of the rest is good, compare function might be my problem, if anyone has an idea how to compare it to work i would appreaciate.
BlueZu #4
Posted 25 February 2013 - 07:26 AM
I've fixed it by doing a nonstop circle. You can delete/close post.