I'm new to Love, as well as lua. I'm trying to learn from the tutorials on the wiki, but i have a problem. I'm trying to do this tutorial: http://love2d.org/wiki/Tutorial:Hamster_Ball
I did everything that the wiki told me to, but whenever I try to run it i get this:
Error
Could not open file hamster.png. Does not exist.
Traceback
[C]: ?
[C]: in function 'newimage'
main.lua: 2: in function 'load'
[C]: in function 'xpcall'
I'm not exactly sure why it isn't working. Please help.
I need help.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: I need help.
Did you download the hamster image, place it in the same directory as the main.lua and rename it hamster.png?
Help us help you: attach a .love.
Re: I need help.
Yes, I did. However I notice that when I have it selected, although it is named hamsterr.png, it shows it as a "Paint Shop Pro Photo X2 Image". It seems like it should be a PNG file, right?Robin wrote:Did you download the hamster image, place it in the same directory as the main.lua and rename it hamster.png?
Re: I need help.
If you are working on windows and have the "hide known extensions" default option on, you may have renamed the file to "hamster.png.png". So you read "hamster.png" but only because Windows hides the known ".png" extension.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: I need help.
Your code references to hamster.png, not hamsterr.png.Ethan wrote:although it is named hamsterr.png
Re: I need help.
Ok, it works now thanks. I'll keep that in mind in future programs.Ellohir wrote:If you are working on windows and have the "hide known extensions" default option on, you may have renamed the file to "hamster.png.png". So you read "hamster.png" but only because Windows hides the known ".png" extension.
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest