←  Ask a Pro

ComputerCraft | Programmable Computers for Minecraft

»

paintutils.loadImage don't work

Dereki2000's Photo Dereki2000 15 Jul 2018

Hey guys,

I want to display an image. My folder is :

+rom
-image.nfp
-program.lua

My program is:

image = paintutils.loadImage("image")
paintutils.drawImage(image,1,1)


The problem is, that image is 'nil'. I know this, because I printed image after loading it. Why doesn't work it?
Edited by Dereki2000, 15 July 2018 - 02:22 AM.
Quote

LDDestroier's Photo LDDestroier 15 Jul 2018

The filename for the image is "image.nfp", so should you not be using paintutils.loadImage() on "image.nfp"?
Quote

Dereki2000's Photo Dereki2000 15 Jul 2018

What?
I want to draw this image, I made with paint. So I need this 2 functions or not?
Quote

Bomb Bloke's Photo Bomb Bloke 15 Jul 2018

image = paintutils.loadImage("image.nfp")
Quote

Dereki2000's Photo Dereki2000 15 Jul 2018

View PostBomb Bloke, on 15 July 2018 - 05:49 AM, said:

image = paintutils.loadImage("image.nfp")

I did that, it didn't work too. But I heard about something like a bug in the Beta build of CC. There was a Topic in this forum about, but it hasn't worked by me(http://www.computerc...page__view__get new post) . How can I fix this?
Edited by Dereki2000, 15 July 2018 - 05:28 PM.
Quote

Bomb Bloke's Photo Bomb Bloke 16 Jul 2018

If you're getting that specific error, then you'll simply need to update your ComputerCraft installation. Some sources are available through the links in my signature - I recommend SquidDev's CC:Tweaked.
Quote