Posted 15 October 2015 - 09:54 PM
Hi there, so I have always used the built in stuff (e.g. excavate) as I never really needed to use CC for more than that. However, I want to do more advanced stuff, and CC is going to be best to automate this. So what I am trying to do is run the following code on button press:
However, I feel I am doing something wrong, as I did just a few lines and when I saved the program it deleted it.
So I:
Opened the Advanced Computer
Typed:
Saved the program
And when I went to run it, it wasn't saved, and when I tried to edit it it was blank.
But that I can sort out at a later date, my main issue is getting the code correct.
Do I need to do anything like put "start" and "end" around the code? Is there anything missing from what I have shown that is needed?
Sorry if this sounds like I don't know what I'm doing.
Thanks
-Jordan
redstone.setOutput("down", true)
sleep(0.05)
redstone.setOutput("down", false)
sleep(2)
redstone.setOutput("down", true)
sleep(0.05)
redstone.setOutput("down", false)
sleep(2)
redstone.setOutput("down", true)
sleep(0.05)
redstone.setOutput("down", false)
sleep(2)
redstone.setOutput("up", true)
sleep(0.05)
redstone.setOutput("up", false)
sleep(2)
redstone.setOutput("up", true)
sleep(0.05)
redstone.setOutput("up", false)
sleep(2)
redstone.setOutput("up", true)
sleep(0.05)
redstone.setOutput("up", false)
sleep(2)
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("right", true)
sleep(0.05)
redstone.setOutput("right", false)
sleep(2)
redstone.setOutput("back", false)
sleep(1)
And repeat that 3 more times, then do:
redstone.setOutput("left", true)
sleep(0.05)
redstone.setOutput("left", false)
sleep(2)
4 times. And that would be where it ends ready for the next button press (or other means of redstone activation) to begin the process again.However, I feel I am doing something wrong, as I did just a few lines and when I saved the program it deleted it.
So I:
Opened the Advanced Computer
Typed:
edit quarry
Typed in the first 4 lines of the code I intend to useSaved the program
And when I went to run it, it wasn't saved, and when I tried to edit it it was blank.
But that I can sort out at a later date, my main issue is getting the code correct.
Do I need to do anything like put "start" and "end" around the code? Is there anything missing from what I have shown that is needed?
Sorry if this sounds like I don't know what I'm doing.
Thanks
-Jordan