i ran into a problem, i have a code, that i think should work, but its giving me an error, where i dont really see one..
is it just me, that is blind, or have i made an error somewhere
im getting
unexpected symbol on line 236
the first line of the code tag is line 223 of my program, i got you the entire function.
local function auto()
mon.setBackgroundColor(black)
for i=3,15 do
mon.setCursorPos(22,i)
mon.write(" ")
end
print("auto")
while true do
local maxenergy = 10000000
local energy = r.getEnergyStored()
energyperc = math.floor((energy / maxenergy) * 100)
if energyperc <= 5 then
r.setAllControlRodLevels(0)
elseif energyperc >= 6 and <=10 then
r.setAllControlRodLevels(5)
elseif energyperc >= 11 and <=15 then
r.setAllControlRodLevels(10)
elseif energyperc >= 16 and <=20 then
r.setAllControlRodLevels(15)
elseif energyperc >= 21 and <=25 then
r.setAllControlRodLevels(20)
elseif energyperc >= 26 and <=30 then
r.setAllControlRodLevels(25)
elseif energyperc >= 31 and <=35 then
r.setAllControlRodLevels(30)
elseif energyperc >= 36 and <=40 then
r.setAllControlRodLevels(35)
elseif energyperc >= 41 and <=45 then
r.setAllControlRodLevels(40)
elseif energyperc >= 46 and <=50 then
r.setAllControlRodLevels(45)
elseif energyperc >= 51 and <=55 then
r.setAllControlRodLevels(50)
elseif energyperc >= 56 and <=60 then
r.setAllControlRodLevels(55)
elseif energyperc >= 61 and <=65 then
r.setAllControlRodLevels(65)
elseif energyperc >= 66 and <=70 then
r.setAllControlRodLevels(70)
elseif energyperc >= 71 and <=75 then
r.setAllControlRodLevels(75)
elseif energyperc >= 76 and <=80 then
r.setAllControlRodLevels(80)
elseif energyperc >= 81 and <=85 then
r.setAllControlRodLevels(95)
elseif energyperc >= 86 and <=90 then
r.setAllControlRodLevels(90)
elseif energyperc >= 91 and <=95 then
r.setAllControlRodLevels(95)
elseif energyperc >= 96 and <=99 then
r.setAllControlRodLevels(100)
end
end
end