[EXTERNAL FILES] Can't read external file!

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
RaptrStudios
Prole
Posts: 39
Joined: Thu Jan 22, 2015 5:46 am

[EXTERNAL FILES] Can't read external file!

Post by RaptrStudios »

I have a game that needs to read external files on the hard drive, and assign them to a variable. The way it is setup now works with the files without exporting it to a .love and with a .love file. However it does not work with a .exe file! How do i fix this?
Here is the source
Source:
http://raptrstudios.weebly.com/games.html
Basic Example:

Code: Select all

	if not love.filesystem.exists('money.lua') then
		love.filesystem.write("money.lua", "p.amount_money\n=\n" ..p.money)
	end
Raptr Studios
http://raptrstudios.weebly.com/

Please consider donating to us!

New Game I'm Working On - Cerradon
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: [EXTERNAL FILES] Can't read external file!

Post by davisdude »

That's because .exe's have different save paths than normal games.
Config Files wrote:When a fused game in release mode is run it will not save in the love save dir, but rather one for itself, whereas previously it would be %APPDATA%\\LOVE\\game on Windows, it now is %APPDATA%\\game. This concept applies to other platforms as well.
See also: https://www.love2d.org/wiki/love.filesystem.isFused
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
RaptrStudios
Prole
Posts: 39
Joined: Thu Jan 22, 2015 5:46 am

Re: [EXTERNAL FILES] Can't read external file!

Post by RaptrStudios »

Thanks!
Raptr Studios
http://raptrstudios.weebly.com/

Please consider donating to us!

New Game I'm Working On - Cerradon
Post Reply

Who is online

Users browsing this forum: No registered users and 178 guests