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

Q:How do I make a turtle accutly work?

Started by Zambonie, 26 December 2012 - 08:52 AM
Zambonie #1
Posted 26 December 2012 - 09:52 AM
So,I have been trying a couple of times,from youtube,wikis and others to make my turtle make a house.And it never worked.So,does anyone know any answers.Somthing maybe were you could explain?
Zambonie #2
Posted 26 December 2012 - 12:43 PM
Ok,so wnet to the movies and I came back with no replies.Wow :/
remiX #3
Posted 26 December 2012 - 12:47 PM
What exactly is your problem? Have you made any code at all?
Luanub #4
Posted 26 December 2012 - 12:47 PM
Post the code that you were using that is not working and we'll help you figure out whats wrong.
Zambonie #5
Posted 26 December 2012 - 12:57 PM
Ya,I dont have the code,because everythink justs gets messed up.So Ijsut keep deleting them,but can really someone just maybe explain the code?
Zambonie #6
Posted 26 December 2012 - 01:02 PM
Accutly,heres a little example code.I dont know what im doing wrong or something,but her it is:
while true do
print("Making an house!")
turtle.foward("3")

Ok,so?
Zambonie #7
Posted 26 December 2012 - 01:03 PM
Edit:I forgot to put the end there,it was already in the original code,just forgot it there :/
Lyqyd #8
Posted 26 December 2012 - 01:04 PM
We help with the code you've already got, we don't write it for you.
Zambonie #9
Posted 26 December 2012 - 01:05 PM
Oh and I forgot,my problem is that it will mine,just not move…
Luanub #10
Posted 26 December 2012 - 01:26 PM
Did you give it fuel?
nitrogenfingers #11
Posted 26 December 2012 - 01:26 PM
If your turtle isn't moving, then it probably needs to be refuelled.
Regarding the code you posted, on line 3 you pass a string as a parameter to turtle.forward, which accepts no parameters and will consequently have no effect. To move your turtle forward 3 spaces you will need to call turtle.forward 3 times. For any house making routine, you'll probably not want to keep the turtle moving forever so the while true loop encapsulating your code seems unnecessary. A while loop with an iterator, or a repeat/for loop would be more appropriate.

More generally, I'll infer you're very new to programming and to lua, which is cool, everyone has to start somewhere, but before you start asking technical questions about code you'll probably need a firmer grip on the basics. I'd recommend getting more familiar with lua as well as the CC-specific API's and come up with some concrete code- people on the forums will then be in a much better position to help you.
ChunLing #12
Posted 26 December 2012 - 02:29 PM
If a particular program you found posted on the forums doesn't work, post your specific problem in the thread for that program.

If none of them work, then the problem isn't with the programs. The problem is you're doing something wrong. In this case, most likely what nitrogenfingers said.