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

paintutils.drawImage()

Started by Hydrotronics, 20 August 2016 - 02:23 PM
Hydrotronics #1
Posted 20 August 2016 - 04:23 PM
I know I'm running another post at the same time, but I'm working on something reletively big and I'm trying to get as much done as possible with the time I have.
I have a function which makes life easier for drawing boxes for the User Creation thing but the drawImage function isn't working. I have confirmed that the image is in that location.
this is my code:


os.loadAPI("Kitsune/apis/ks")
local function box(name)
   ks.colourScreen(colors.orange)
   paintutils.drawImage("Kitsune/images/logo",1,10)
   paintutils.drawBox(4,8,47,10,colors.black)
   paintutils.drawLine(5,9,46,9,colors.white)
   ks.center(name,7)
   term.setTextColor(colors.black)
end

It's throwing the error "expected image, x, y" when it has been supplied with image, x, y
KingofGamesYami #2
Posted 20 August 2016 - 04:47 PM
You gave it a string, not an image object.

See the example on this page.
Hydrotronics #3
Posted 20 August 2016 - 04:50 PM
oh. I forgot about that XD
thx!