Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Image.load error in Lua

                  
   
  1. #1
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    68

    psp Image.load error in Lua

    Hi, I started learning lua today (:P) and when i try to set a background using Image.load(filename) it gives the error
    Code:
    Image.load: Error loading image
    It is 480x272 exactly and is .png, what is the problem?

  2. #2
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    85

    Default

    Filename or filepath incorrect? Can you show the exact line of code that gives the error?

  3. #3
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    68

    Default

    background = Image.load("background-night.png")

  4. #4
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    85

    Default

    How are you running the scripts? Is the image in the same folder as the script? Is the script in the same folder as the luaplayer.exe?

  5. #5
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    68

    Default

    The script is in a folder and it is with the image. but the luaplayer is in a different folder.

  6. #6
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    85

    Default

    Can you show the batch file that you are using to run the script?

  7. #7
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    68

    Default

    test.cmd:
    Code:
    luaplayer "Legend of Thuan\index.lua"

  8. #8
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    85

    Default

    If you do it that way, the pictures have to be in the same directory as the exe.

    If you have following:
    "../luaplayer.exe" index.lua
    pause

    and the .cmd file in the same directory as the script, the pictures must be in the same directory as the script.

  9. #9
    PSP User
    Join Date
    Jun 2006
    Location
    Under your bed (H)
    Posts
    377
    Rep Power
    68

    Default

    But playing it on the psp gives out the error "libpng error: idat: crc error"?

  10. #10
    DCEmu Coder MasterChafed's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Age
    34
    Posts
    832
    Rep Power
    92

    Default

    are u getting the Image.load error in lua for psp? If so what version of Lua Player are u using? I had similar problems when using luaplayer .20, if u are using this version, try using version .16, thats what I had to use to get past that problem in Halo 2d.
    http://one.revver.com/watch/170516
    http://one.revver.com/watch/167200

    Please click the links above to watch my stick figure animations,
    and please, if you have the time, click the ads at the end to earn me some money.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •