Posted 17 May 2015 - 05:54 PM
startup: 1: attempt to call nil
My program
My program
reactor = peripheral.warp("back")
cube = peripheral.warp("left")
actif = reactor.getActive()
maxCube = cube.getMaxEnergy()
while true do
energystore = cube.getStored()
level = (energystore*100)/maxCube
if actif then
if level >= 99 then reactor.setActive(false) end
else
if level <= 10 then reactor.setActive(true) end
end
sleep(1)
end
Thank