Posted 08 March 2016 - 08:17 PM
–SOLVED–
I've been trying to create some customizability features for my operating system. However, reading the data from the file isn't working properly. I have no idea why.
The data in the file 'tcolor' is just colors.gray .
The error is window:179:string expected, got nil which means I'm putting in something that isn't a color. Even though it is…
I've been trying to create some customizability features for my operating system. However, reading the data from the file isn't working properly. I have no idea why.
The data in the file 'tcolor' is just colors.gray .
The error is window:179:string expected, got nil which means I'm putting in something that isn't a color. Even though it is…
Spoiler
function getInfo()
tb = fs.open("/ppc/oss/tcolor","r")
sb = fs.open("/ppc/oss/scolor","r")
TData = {}
local tline = tb.readLine()
table.insert(TData,line)
line = tb.readLine()
tb.close()
tbcolor = TData[1]
SData = {}
local sline = sb.readLine()
table.insert(SData,line)
line = sb.readLine()
sb.close()
sbcolor = SData[1]
end
function draw()
img = paintutils.loadImage("/ppc/systemi")
paintutils.drawImage(img,1,1)
paintutils.drawLine(7,1,26,1,tbcolor)
term.setCursorPos(1,1)
tbcolor = TData[1]
term.setBackgroundColor(sbcolor)
print("@Start")
term.setBackgroundColor(tbcolor)
term.setCursorPos(8,1)
print("Title Bar")
end
function interact()
local event, button, x, y = os.pullEvent("mouse_click")
if x <= 6 and y == 1 then
shell.run("/ppc/start")
else
interact()
end
end
getInfo()
draw()
interact()
Edited on 08 March 2016 - 08:36 PM