Jump to content

CC help


FluffyStonerBear

Recommended Posts

Hello there!

Ok I got a little problem, as far as I can see, theres no problem with my script... But I'm not experienced with Lua so I might have missed something.
Because my script gets bugged/stops working after a while.

local bigr = peripheral.wrap("back")
local monitor = peripheral.wrap("top")
local modem = peripheral.wrap("left")
local capMax = 60000000
 
modem.open(1)
 
while true do
 
energyStored = modem.callRemote("tile_blockcapacitorbank_name_0", "getEnergyStored")
bigrEnergy = bigr.getEnergyStored()
 
monitor.clear()
monitor.setCursorPos(1,1)
    monitor.write("BigReactor Energy = "..bigrEnergy.." RF")
monitor.setCursorPos(1,2)
    monitor.write("EnderIO RF stored = "..energyStored.." RF")
 
if energyStored < 20000 then
    if bigrEnergy == 0 then
        repeat
        bigr.setActive(true)
        sleep(5)
        bigrEnergy = bigr.getEnergyStored()
        until bigrEnergy > 9999900
    end
end
 
bigr.setActive(false)
sleep(1)
end

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site you agree to the following Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.