Posted 04 April 2013 - 03:40 PM
Alright, so im following the tutorial on making an OS for an advanced computer to learn a few things, and ive hit a snag.
Im getting an error " bios:338: [string "gui"]:20: '=' expected ".
this problem is coming up when useing the paintutils api "bground = paintutils.loadImage(.background)"
here is the code (btw im using ccemu)
thats it. I have tried to fix this for a fortnight and im stumped, so all help will be greatly appreciated.
Thanks!
Im getting an error " bios:338: [string "gui"]:20: '=' expected ".
this problem is coming up when useing the paintutils api "bground = paintutils.loadImage(.background)"
here is the code (btw im using ccemu)
--Desktop
slc = 0
tBarC = 8
tBartC = 1
backColor = 1
term.setBackgroundColor(backColor)
term.clear()
function titleBar()
term.setCursorPos(1,1)
term.setBackgroundColor(tBarC)
term.setTextColor(tBartC)
term.clearLine()
term.setCursorPos(3, 1)
print("[Begin]")
end
function drawDesktop()
term.setBackgroundColor(backColor)
term.clear
bground = paintutils.loadImage(.background)
paintutils.drawImage(bground, 1, 1)
titleBar()
end
drawDesktop()
while true do
local event, button, X, Y = os.pullEventRaw()
if slc == 0 then
if event == "mouse_click" then
if X >=2 and X <=8 and y==1 and button ==1 then
term.clear()
else
drawDesktop()
end
end
end
end
thats it. I have tried to fix this for a fortnight and im stumped, so all help will be greatly appreciated.
Thanks!