Re ultimate wood chopper turtle program.....problems

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Calibra

New Member
Jul 29, 2019
38
0
0
Hi
I built the small farm first, then expanded to the large one. The only ' build ' problem i had, was that the 4 dirt blocks ( for the tree) did not build....dont know why....

Anyway looking at the video i placed the four dirt blocks.....all worked very well the saplings were planted the bonemeal was added and the tree grew. It was then chopped down and the turtle returned to drop off the wood.

This works perfectly for several ' runs' then suddenly it stops just past the left frint corner dirt block and says something about fertilising the tree, cant fertilise the tree and will retry in 120 seconds....it then retries with the same error and waits another 120 seconds.....ad infinitum

If i break the turtle and replace it and restart, the same thing happens, works perfectly for a few turns then the same issue..

if i have put the dirt blocks in the wrong place could this be the reason ( although it works perfectly for a few goes )

Any help would really be appreciated.....i am using a spruce sapling......should that be ok ???

Thanks
 

BlackFire

New Member
Jul 29, 2019
344
0
0
One, where did you get this program? Two, can you pastebin it? Three,
I built the small farm first, then expanded to the large one. The only ' build ' problem i had, was that the 4 dirt blocks ( for the tree) did not build....dont know why....
what?
 

Calibra

New Member
Jul 29, 2019
38
0
0
http://pastebin.com/Kngv6tWj

From computercraft.....i hoped it would be ok to ask the question here....

I joined computercraft, but despite requesting the email verification i still haven't received one, so therefore cant post or reply to posts.....only one mod has contact details and has not replied to me....

Thanks
 

BlackFire

New Member
Jul 29, 2019
344
0
0
I think i found the problem. Somewhere in that program the turtle places the sapling and grows it with bonemeal. Then for redundancy the program checks to see if the tree grew. This is where your program gets stuck. When the turtle finds that it didnt grow, it backs up, waits, then moves forward. Instead of starting from the beginning, it assumes there is already a sapping still there. It sounds like there isn't a sapling in its inventory and it thinks it planted one.

So, to fix it...*shrugs shoulders*

you might want to try contacting the author.
 

Enigmius1

New Member
Jul 29, 2019
499
0
0
When I was in highschool I wrote programs in the same style as this one...bloated with all manner of extraneous fluff. The challenge with writing this kind of script is that anyone else who is trying to discover what the source of a problem might be is so exhausted by the time they get through the fluff that it's tough to focus when they finally settle on some meat. Coupled with a lack of in-line documentation and I'm left unwilling to track down what the problem might be. If I were inclined to use scripts written by other people, they'd have to be incredibly powerful scripts for me to not ditch them at the first sign of trouble.
 

BlackFire

New Member
Jul 29, 2019
344
0
0
When I was in highschool I wrote programs in the same style as this one...bloated with all manner of extraneous fluff. The challenge with writing this kind of script is that anyone else who is trying to discover what the source of a problem might be is so exhausted by the time they get through the fluff that it's tough to focus when they finally settle on some meat. Coupled with a lack of in-line documentation and I'm left unwilling to track down what the problem might be. If I were inclined to use scripts written by other people, they'd have to be incredibly powerful scripts for me to not ditch them at the first sign of trouble.

Well said sir
 

Calibra

New Member
Jul 29, 2019
38
0
0
I think i found the problem. Somewhere in that program the turtle places the sapling and grows it with bonemeal. Then for redundancy the program checks to see if the tree grew. This is where your program gets stuck. When the turtle finds that it didnt grow, it backs up, waits, then moves forward. Instead of starting from the beginning, it assumes there is already a sapping still there. It sounds like there isn't a sapling in its inventory and it thinks it planted one.

So, to fix it...*shrugs shoulders*

you might want to try contacting the author.

Hi
Thanks for looking....i cant contact the author, because as i mentioned previously i cant reply or make posts on computercraft forum as i just cant get the email verification sent..,.keep requesting it.....need a member to ask a mod to sort it out for me......user name calibra....

Have written z80 assembler and basic in the past, but turtle code seems so complicated......maybe i should try my own tree logger....any ideas where to start ???
 

Calibra

New Member
Jul 29, 2019
38
0
0
Thanks, will look at these.

Have managed to leave a message re UWC for the author on the you tube video comments.

Can anyone help me with contacting computercraft mod.....dont know what else to do

Thanks

Calibra
 

Enigmius1

New Member
Jul 29, 2019
499
0
0
Thanks, will look at these.

Have managed to leave a message re UWC for the author on the you tube video comments.

Can anyone help me with contacting computercraft mod.....dont know what else to do

Thanks

Calibra

Just to help you out, this isn't a multi-mod support forum. If you've found the ComputerCraft main site, on that site will be contact information for the devs. I would encourage you, however, to not contact the ComputerCraft devs about this because it's not an issue with the mod. It's an issue with the script, or how you are setting things up. We can't help you with that because we don't know how you've set it up, we don't know how it's supposed to be set up, we didn't write the script, and the script isn't documented to make sorting it out easy. You're going to need to be patient on this. It's just a tree farm, not a BSOD on a work PC.
 

namiasdf

New Member
Jul 29, 2019
2,183
0
0
Does it complete a full cycle? i.e. Does it complete a full loop of the program or any subsequent loop?

i.e. Define the full program loop and where the program breaks (be very specific)
 

Calibra

New Member
Jul 29, 2019
38
0
0
Think someone misunderstood me.......i,was not going to contact computercraft mods about a program !!!

The issue i have with computercraft forum is that incant make posts or reply to any.....i have not received the confirmation email, despite requesting it many many times. I assume this is why i am not allowed to post or make replies......this is why i want to contact the forum mods.....

I had hoped a forum member could help me......username is calibra

Thanks
 

Calibra

New Member
Jul 29, 2019
38
0
0
Does it complete a full cycle? i.e. Does it complete a full loop of the program or any subsequent loop?

i.e. Define the full program loop and where the program breaks (be very specific)

The turtle runs fine, it chops, plants saplings adds bonemeal, returns deposits the wood etc and then goes back out.....i haven't sat and watched, but it runs for several ' loops' then it gets stuck at the empty space to the left of the leftmost dirt block viewed from the chests....i get the message that it tried to place bonemeal then something about waiting 120 seconds.....this repeats infinitely..... The turtle has plenty of saplings, bonemeal and fuel.
The dirt blocks did not build when the farm was built......went straight from small to large without running the small farm first.....
If you-want any logs etc let me know or screen shots

Thanks
 

Hydra

New Member
Jul 29, 2019
1,869
0
0
Have written z80 assembler and basic in the past, but turtle code seems so complicated......maybe i should try my own tree logger....any ideas where to start ???


I'm sorry but if you really wrote assembler I really don't believe you'd find turtle code complicated.

There's plenty of tutorials on the CC wiki. It's the best place to start.
 

whd23

New Member
Jul 29, 2019
111
0
1
....maybe i should try my own tree logger....any ideas where to start ???


Check out this series of videos. First episode shows the writing of a very simple logger.


Use only trees that grow without branches to make your life a lot easier (spruce or birch, for example)

Programming the turtle to be a logger will be the same as any programming task. Start by breaking down the problem into smaller chunks and then implement each chunk.

You might make a list like:
1) turtle needs to chop down a tree from bottom to top and know when to stop moving upward
2) turtle needs to maintain a minimum fuel level to avoid running out of fuel out of the user's reach
3) turtle needs to be able to plant saplings
4) turtle needs to be able to fertilize saplings
5) turtle needs to deposit the items harvested into a nearby chest
6) turtle needs to retrieve more fuel from a nearby chest

A turtle can't identify items without comparing them to something else. This means you'll need a copy of everything you want the turtle to identify in the turtle's inventory. So maybe your code would have something like:

Code:
local fuelSlot = 1
local saplingSlot = 2
local fertilizerSlot = 3
local woodSlot = 4

Then you can use the turtle API to compare things above, below, or in front of the turtle against the current slot:

Code:
-- Is there wood in front of me?
turtle.select(woodSlot)
if turtle.compare()  then
  -- harvest the wood
end
 

Calibra

New Member
Jul 29, 2019
38
0
0
Hi
Thanks this will give me a god start....


Re my other problem. Is there someone who could help me contact a board admin for computercraft forum ?

I still can not make any posts or create posts.....i KEEP requesting the verification email, but it does not get sent to me.

Maybe they have a serious problem, but i cant find any way to contact anyone.....

Thanks
 

Calibra

New Member
Jul 29, 2019
38
0
0
Does it complete a full cycle? i.e. Does it complete a full loop of the program or any subsequent loop?

i.e. Define the full program loop and where the program breaks (be very specific)
Hi. I gave a detailed reply tomthe problem. Did you have any luck finding the bug ?

This is a good program, but this is annoying
Thanks