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

Here's a quick error problem.

Started by IndustrialLemon, 09 November 2018 - 12:54 AM
IndustrialLemon #1
Posted 09 November 2018 - 01:54 AM
Not sure what's going on here.


local loadScreen = paintutils.loadImage("testImage.nfp")
paintutils.drawImage(loadScreen, 1, 1)

The error this code produces is

paintutils.lua:38: attempt to call nil

I understand what attempt to call nil on its own usually means. What's the problem here? I'm trying to apply the same logic but I'm pretty sure my syntax is fine. (Comparing this code directly to the wiki)



Keep in mind.
testImage.nfp DOES exist. It's very real.
KingofGamesYami #2
Posted 09 November 2018 - 02:30 AM
Probably not related to the actual error, but paintutils doesn't handle the nfp format.
IndustrialLemon #3
Posted 09 November 2018 - 03:09 AM
Hmm. I thought the whole purpose of painutils.loadImage() was to load a previously drawn image using the 'paint' program. Paint produces .nfp files.
KingofGamesYami #4
Posted 09 November 2018 - 04:21 AM
Huh, I did not know that. NFP was originally used by NPaintPro which supports more than the default paint program. I retract my earlier statement.

http://www.computercraft.info/forums2/index.php?/topic/5029-145-npaintpro/
Bomb Bloke #5
Posted 09 November 2018 - 05:44 AM
It's a bug in one of the earlier CC1.80 pre-release builds. Update to a later version.