IceG4merBR 0 Posted May 11, 2018 Share Posted May 11, 2018 I did a program to manage my batteries and reactors, and i got a problem in reactor.setActive(true/false) for address, name in pairs(reactorsID) do local reactor = component.proxy(address) countR = countR + 1 local tR = (countR + count) * 3 progressBar( name, tR, reactor.getEnergyStored(), reactor.getEnergyCapacity(), 0x00bb00, true, "RF") progressBar( "Reactor(Energy Last Tick)", tR + 3, math.ceil(reactor.getEnergyProducedLastTick()), 6200, 0x00bb00, true, "RF") if brPower + totalPower < brMaxPower + totalMaxPower then reactor.setActive(True) else reactor.setActive(False) end end The reactor doesn't turn on or off, and the program doesn't return any error . Here is the full code : https://pastebin.com/gkmtstis Quote Link to post Share on other sites
0 Solution Fingercomp 37 Posted May 11, 2018 Solution Share Posted May 11, 2018 No Lua built-in function, type name, primitive, library, etc. starts with a capital letter. So you should write true, not True. Quote Link to post Share on other sites
I did a program to manage my batteries and reactors, and i got a problem in reactor.setActive(true/false)
The reactor doesn't turn on or off, and the program doesn't return any error
.
Here is the full code : https://pastebin.com/gkmtstis
Link to post
Share on other sites