Results 1 to 4 of 4

Thread: Image loading error?

  
  1. #1
    SHiZNuT is offline -Hacks Neophyte
    Join Date
    Jan 2006
    Location
    Santa Clause, To: You!
    Posts
    51
    Rep Power
    14

    Default

    Hey, I was trying to test a script (which previously worked) and now I am getting errors when the images are loading. It gives me an error on line 9, and crashes before trying to load the rest. Yes the images are in the right folder, and I have tried it with .PNG and .png. Still no luck.

    Any ideas?

    Code:
    green = Color.new(0, 255 , 0)
    
    screen:print(194, 136, "Loading: 0%", green)
    screen.flip()
    
    ship = Image.load("images/ship.PNG") <<< This is line 9, by the way!
    screen:clear()
    screen:print(194, 136, "Loading: 33%", green)
    screen.flip()
    
    alien = Image.load("images/alien.PNG")
    screen:clear()
    screen:print(194, 136, "Loading: 66%", green)
    screen.flip()
    
    laser = Image.load("images/laser.PNG")
    background = Image.load("images/background.PNG")
    thanks

    \"I like my women like I like my Reese\'s Cups: Peanut Butter AND chocolate\"

  2. #2
    illfoundedmind is offline -Hacks Enthusiast
    Join Date
    Nov 2005
    Location
    WTF~~~~~~~~~~> Rank: %NULL
    Posts
    389
    Rep Power
    14

    Default

    Is the ship.png over 512x512? Lua will not load images larger then that
    july 19

  3. #3
    SHiZNuT is offline -Hacks Neophyte
    Join Date
    Jan 2006
    Location
    Santa Clause, To: You!
    Posts
    51
    Rep Power
    14

    Default

    its 32x50

    or 50x32


    it was working fine, then it just stopped working for no apparent reason...
    \"I like my women like I like my Reese\'s Cups: Peanut Butter AND chocolate\"

  4. #4
    kozine is offline -Hacks Newbie
    Join Date
    Mar 2006
    Posts
    2
    Rep Power
    0

    Default

    Cleaned up code:

    Code:
    --Load colours
    green = Color.new(0, 255, 0)
    
    --Load Images
    ship = Image.load("images/ship.PNG")
    alien = Image.load("images/alien.PNG")
    laser = Image.load("images/laser.PNG")
    background = Image.load("images/background.PNG")
    
    --Rest of Code
    screen:print(194, 136, "Loading: 0%", green)
    screen.flip()
    
    screen:clear()
    screen:print(194, 136, "Loading: 33%", green)
    screen.flip()
    
    screen:clear()
    screen:print(194, 136, "Loading: 66%", green)
    screen.flip()
    Try that.

Posting Permissions

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