Im using the code

    mfe = peripheral.wrap("side")
    while true do
      euPercent = mfe.getEUStored() / mfe.getEUCapacity()
      if euPercent==1 then
        redstone.setOutput("side", false)
      elseif euPercent<=.5 then
        redstone.setOutput("side", true)
      end
      sleep(1)
    end

This is so that i can have my computer turn off my nuclear reactor when its full on power and on when its not full but when i try and run the program it says "reactor:3: attempt to index ? (a nil value)