Not sure if i should be posting this in this board, or the other one, or what to call this even, but anyways...
I have a VERY simple love file, the contents are a main.lua file, who's code is just:
love.filesystem.write("options.cfg", "test")
Nothing happens.
I've attempted a few variations, including adding the third argument: all and changing the path to "/options.cfg" and still, no go. How do i go about making a file in the same directory as the .love file?
Filesystem issues.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Filesystem issues.
I wouldn't recommend that. Let Löve put its file where it wants to. Which is in your AppData folder on Windows or the Library/Application Support/ folder on OS X. It's generally not recommended to dive into the os.* functions in Löve since they A) can change at any time and B) work differently across platforms.
Is there a reason you want to put it in the same directory? I can't think of any reason you can't just store any data in the proper location.
Is there a reason you want to put it in the same directory? I can't think of any reason you can't just store any data in the proper location.
Re: Filesystem issues.
Ey, that was all i needed to know. The wiki doesnt say, at least from what i saw, that it will save files to app data.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Filesystem issues.
Here you go:
http://www.love2d.org/wiki/love.filesystem
Explains everything including where the files will be put.
http://www.love2d.org/wiki/love.filesystem
Explains everything including where the files will be put.
By setting the identity, you give a name to the folder the files will go in.Windows XP: C:\Documents and Settings\user\Application Data\LOVE\ or %appdata%\LOVE\
Windows Vista and 7: C:\Users\user\AppData\Roaming\LOVE or %appdata%\LOVE\
Linux: $XDG_DATA_HOME/love/ or ~/.local/share/love/
Mac: /Users/user/Library/Application Support/LOVE/
It is recommended to set your game's identity first in your conf.lua. You can set it with love.filesystem.setIdentity() as well.
Who is online
Users browsing this forum: Google [Bot] and 5 guests