This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Saxguy99's profile picture

Help With My Gui Plzz

Started by Saxguy99, 27 August 2013 - 07:24 AM
Saxguy99 #1
Posted 27 August 2013 - 09:24 AM
Hi i was wandering if any one could take a look and tell me why i keep getting the error paintutils:92: attempt to get length of nil
plzz i need this so i can start my os


--desktop
function titleBar()
term.setCursorPos(1,1)
term.setBackgroundColor(colors.orange)
term.setTextColor(colors.black)
term.clearLine()
term.setCursorPos(3,1)
print("Start")
end
function drawDesktop()
term.setBackgroundColor(colors.white)
term.clear()
titleBar()
desktopBG = paintutils.loadImage("DesktopBG")
paintutils.drawImage(desktopBG,1,1)
end
drawDesktop()
Alekso56 #2
Posted 27 August 2013 - 09:33 AM
the file /DesktopBG did not exist. please create one.
Saxguy99 #3
Posted 27 August 2013 - 09:42 AM
it does exitst but its in a custom dir
Last1Here #4
Posted 27 August 2013 - 10:10 AM
Then tell it what directory it's in say its in img you'll need to put

desktopBG = paintutils.loadImage("img/DesktopBG")
Saxguy99 #5
Posted 27 August 2013 - 10:12 AM
it worked thanks for everything mostly Last1Here