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

Script is not starting

Started by Crash129, 25 September 2014 - 02:52 PM
Crash129 #1
Posted 25 September 2014 - 04:52 PM
Hi,

After I restarted my server the computer with this reactor script isnt starting it anymore. Without an error it just gets aborted.
http://pastebin.com/2G4DNvqk

Is there any mistake in the script?
SGunner2014 #2
Posted 25 September 2014 - 05:17 PM
I think that the problem here is that you're using local variables before the while loop. Try either using global variables or putting the variables inside of the loop.

However, I may be wrong.
MKlegoman357 #3
Posted 25 September 2014 - 05:26 PM
Defining local variables outside a loop and then using them inside the loop should not be causing any problems. Putting them inside the loop would only make this program re-wrap the peripherals each 5 sec, which is not needed.

To OP:
Does the computer start but not run the program? Are you sure that the program is named 'startup' and isn't misspelled (for ex.: 'stratup')?
Crash129 #4
Posted 25 September 2014 - 05:44 PM
Even if I try to start it manually it just starts and stops without an error. The startup is not the problem, the script is not starting. Even if I rename it or rebuild the computer or replace it with an empty computer. The peripherals are named right.
MKlegoman357 #5
Posted 25 September 2014 - 06:41 PM
Hmm, very strange. Could you put some debug prints in different places in the code (for example: print("starting loop") or print("printing information") or print("gathering energy"), etc..).
Crash129 #6
Posted 25 September 2014 - 07:46 PM
I think it was because one of the monitors wasn't in the chunk loader and didnt got loaded after I quit. After I replaced the monitor in the permanently loaded chunk it worked again.