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

(Possible) Bug With Paintutils Api

Started by apemanzilla, 28 September 2013 - 02:25 PM
apemanzilla #1
Posted 28 September 2013 - 04:25 PM
So, I drew an image with the standard "paint" program, and saved it as "test". When I then go to the lua prompt and type "paintutils.drawImage('test',1,1)", expecting it to draw the image onscreen, it throws an error:
paintutils:94: attempt to get length of nil
I have tried different positions, different filenames, different drawings, and browsed through the API lightly, but I cannot find out why it does not work. Can anyone help me with this?
MudkipTheEpic #2
Posted 28 September 2013 - 04:28 PM
You have to load an image to draw it.

paintutils.drawImage(paintutils.loadImage("test"),1,1)
Lyqyd #3
Posted 28 September 2013 - 08:59 PM
Be sure to check the usage and documentation of any APIs you are having trouble with before posting a bug report.

Locked.