LDK - File system and usage?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Phobos001
Prole
Posts: 1
Joined: Fri Aug 31, 2012 12:27 am

LDK - File system and usage?

Post by Phobos001 »

Hello! I've setup LDK for use with LOVE, and I setup subfolders in the project (audio, graphics, lua, etc...).

However, when I do "love.graphics.newImage("maingame/graphics/test.png") and run, it says it couldn't be found.

How would I get this to work properly? Or am I doing something horridly wrong?

Here is a picture:

Image
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: LDK - File system and usage?

Post by T-Bone »

You're on Windows, aren't you? Maybe it doesn't understand the / in the path. If I remember correctly, you can use dots. Like this: "maingame.graphics.pic.png". Otherwise, you probably need backslashes (\)
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: LDK - File system and usage?

Post by Nixola »

Dots can be only used inside 'require'
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: LDK - File system and usage?

Post by Boolsheet »

And the love.filesystem only works with forward slashes.

Do these folders really exist or are those just tags/subcategories/filters that do not actually affect the position of the file in the filesystem?
Shallow indentations.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: LDK - File system and usage?

Post by kikito »

I see a small arrow on the lower right of test.png's icon. Have you copied the real test.png there, or have you created a "direct access" (or whatever windows calls them now) instead? The image should work, the direct access should fail.
When I write def I mean function.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: LDK - File system and usage?

Post by T-Bone »

I think Windows added proper symlink support in Win7 (or was it Vista?), but I don't think it's used by default from the GUI. So that's probably a "link" (as in a .lnk file) and yeah, that doesn't work.
Post Reply

Who is online

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