I'm trying to turn a big/extreme reactor on/off with a simple practice program, but I get a following error when I try to run the program:
/lib/br_control.lua:4: attempt to call field 'setActive'(a boolean value):
stack traceback:/lib/br_control.lua:4:in main chunk
(...tail calls...)[C]:infunction'xpcall'/lib/process.lua:63:infunction</lib/process.lua:59>
A bit more detailed explanation on what each line means might help future troubleshooting.
The test program looks like this:
local br = component.br_reactor
if(br.getEnergyStored()<9000000)then
br.setActive(false)endif(br.getEnergyStored()>1000000)then
br.setActive(true)end
Simply put if the internal energy buffer of the reactor is 90% full, the reactor turns off and if it goes below 10% it turns on. I've made sure that the computer actually recognizes the reactor.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I'm trying to turn a big/extreme reactor on/off with a simple practice program, but I get a following error when I try to run the program:
A bit more detailed explanation on what each line means might help future troubleshooting.
The test program looks like this:
Simply put if the internal energy buffer of the reactor is 90% full, the reactor turns off and if it goes below 10% it turns on. I've made sure that the computer actually recognizes the reactor.
I don't really know why this doesn't work.
Link to post
Share on other sites