Jump to content




paintutils.loadImage don't work


5 replies to this topic

#1 Dereki2000

  • Members
  • 8 posts

Posted 15 July 2018 - 02:15 AM

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.


#2 LDDestroier

  • Members
  • 1,091 posts
  • LocationACDC Town

Posted 15 July 2018 - 03:03 AM

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

#3 Dereki2000

  • Members
  • 8 posts

Posted 15 July 2018 - 03:17 AM

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


#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 15 July 2018 - 05:49 AM

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

#5 Dereki2000

  • Members
  • 8 posts

Posted 15 July 2018 - 05:21 PM

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.


#6 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 16 July 2018 - 01:59 AM

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users