Posted 11 September 2016 - 05:56 PM
I am very confused, the error message reads:
"line 12: then expected" but as far as i can see it looks like its there…
http://pastebin.com/RKYHVTDB
"line 12: then expected" but as far as i can see it looks like its there…
http://pastebin.com/RKYHVTDB
powerCore = peripheral.wrap("draconic_storage_0")
glassesBridge = peripheral.wrap("left")
--PowerCore monitoring
previousPowerLvl = powerCore.getEnergyStored()
while true do
glassesBridge.clear()
currentPowerLvl = powerCore.getEnergyStored()
if previousPowerLvl > currentPowerLvl then
status = "decreasing"
elseif previousPowerLvl = currentPowerLvl then --This is the line according to the computer(bottom right line indicator)
status = "stable"
elseif previousPowerLvl < currentPowerLvl then
status = "increasing"
end
power = powerCore.getEnergyStored()/powerCore.getMaxEnergyStored()
power = math.floor(power)
glassesBridge.addText(5, 5, power.." % power capacity")
glassesBridge.addText(5, 10,"Power "..status)
glassesBridge.sync()
sleep(1)
previousPowerLvl = currentPowerLvl
end