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

functions dont work and help

Started by high v01tage, 04 January 2013 - 05:37 AM
high v01tage #1
Posted 04 January 2013 - 06:37 AM
hello, i have some problem with getting functions to work and im trying to make a detect program but it worn't work.
first off: functions

if i just type turtle.forward() in a program it works fine but if i type function move() turtle.forward() end. it dont work anymore and i cant figure out why i have seen alot of videos and search on the forum to see if i do anyting wrong but i dont think i do

detect programs:
im trying to make a detect programs for my tree farm but i cant figure out how to loop it i want it to go up, detect, if true dig() if false down()
i think i have trying everything but it worn't work prob cuz my functions dont work but still

hope some1 can help me a little. thank you for your time

-high v01tage
Lyqyd #2
Posted 04 January 2013 - 06:46 AM
So, you're doing:


function move()
  turtle.forward()
end

move()

And nothing happens? You need to provide us with the actual code you're using either way, but my guess is that you weren't calling the function. For the other question, please provide your current code.
ChunLing #3
Posted 04 January 2013 - 02:54 PM
On the subject of loops and such.