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

needing some big reactor program help

Started by Dukeprogaming, 14 January 2015 - 04:43 AM
Dukeprogaming #1
Posted 14 January 2015 - 05:43 AM
current program: http://pastebin.com/b84AACVp

im having a problem with this program i've been writing. it start up fine and sets the control rods to 100. though the problem lies with the loop it keeps getting stuck on the first section to lower how much the control rods are in the increase the steam production. it doesnt stop when it gets above the required level.

im trying to get it to where if steam production is high than the x*y it raises the insertion level of the control rods so steam production goes down and vice vesa.
im also trying to have it stop when its fines its balance.

i am asking for help and/or advice on how to get this working.

here are screen shots of the set up.


Lyqyd #2
Posted 14 January 2015 - 06:01 AM
You only get the value of the steam produced once, at the beginning of the program. You need to move that call into your while loop so that it will update as the program goes along.
Dukeprogaming #3
Posted 14 January 2015 - 06:30 PM
thank you for your help first time writing code and didnt think of putting it in the loop