Posted 20 April 2014 - 02:44 PM
Hey there!
First of all you should know that I'm new to the forum and new to computercraft, I haven't done any programming at all. I just tried to learn Computercraft as I am a passionate FTB player.
The problem I now have is the following: I tried to make a program which builds rectangular platforms in a size that you can specify. I tried doing this with two functions and loops ( here's the pastebin: http://pastebin.com/RfAit5aw). However, the way I setup the local variables causes the turtle to ask for the variables everytime the loop begins. I thought about moving the definition of the variables from the function to the main program but I'm not sure if this would work. Does anyone know how I could fix the code and make the program more efficient?
Thanks,
wulfbear_joe
First of all you should know that I'm new to the forum and new to computercraft, I haven't done any programming at all. I just tried to learn Computercraft as I am a passionate FTB player.
The problem I now have is the following: I tried to make a program which builds rectangular platforms in a size that you can specify. I tried doing this with two functions and loops ( here's the pastebin: http://pastebin.com/RfAit5aw). However, the way I setup the local variables causes the turtle to ask for the variables everytime the loop begins. I thought about moving the definition of the variables from the function to the main program but I'm not sure if this would work. Does anyone know how I could fix the code and make the program more efficient?
Thanks,
wulfbear_joe