I need help.

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Ethan
Prole
Posts: 3
Joined: Fri Jan 13, 2012 9:36 pm

I need help.

Post by Ethan »

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.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: I need help.

Post by Robin »

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.
Ethan
Prole
Posts: 3
Joined: Fri Jan 13, 2012 9:36 pm

Re: I need help.

Post by Ethan »

Robin wrote:Did you download the hamster image, place it in the same directory as the main.lua and rename it hamster.png?
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?
User avatar
Ellohir
Party member
Posts: 235
Joined: Sat Oct 22, 2011 11:12 pm

Re: I need help.

Post by Ellohir »

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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: I need help.

Post by bartbes »

Ethan wrote:although it is named hamsterr.png
Your code references to hamster.png, not hamsterr.png.
Ethan
Prole
Posts: 3
Joined: Fri Jan 13, 2012 9:36 pm

Re: I need help.

Post by Ethan »

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.
Ok, it works now thanks. I'll keep that in mind in future programs.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests