So i have a .love file that has code that requires a external file named 'money.lua' and it says it does not exist. Oddly enough this doesn't happen when its not in a .love file. I am running the newest version of love.
Heres the stuffs
Thanx
Web: http://raptrstudios.weebly.com/
[HELP] External File Problem
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 39
- Joined: Thu Jan 22, 2015 5:46 am
[HELP] External File Problem
Raptr Studios
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
-
- Prole
- Posts: 44
- Joined: Sat Dec 15, 2012 7:55 am
Re: [HELP] External File Problem
The problem may be because the file "money.lua" is not being created on line 85.
I don't think love.filesystem.newFile() actually writes a physical file to the hard drive. love.filesystem.write() will create a file if it does not exist. You can try changing that line to:
https://love2d.org/wiki/love.filesystem.write
I don't think love.filesystem.newFile() actually writes a physical file to the hard drive. love.filesystem.write() will create a file if it does not exist. You can try changing that line to:
Code: Select all
if not love.filesystem.exists("money.lua") then
coins = love.filesystem.write("money.lua", "File contents")
end
-
- Prole
- Posts: 39
- Joined: Thu Jan 22, 2015 5:46 am
Re: [HELP] External File Problem
Ill try it, thanks!
Raptr Studios
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: [HELP] External File Problem
If you mean a file that's not in the .love file, then you can use the game's save folder to load in files, and to save them there.RaptrStudios wrote:So i have a .love file that has code that requires a external file...
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
- Prole
- Posts: 39
- Joined: Thu Jan 22, 2015 5:46 am
Re: [HELP] External File Problem
I dont know how.
Could you show me?
Also, i have encountered an error, i fixed the problem with a .love file but when i export it to a .exe it says that the file could not be found!
How could i fix this??
Could you show me?
Also, i have encountered an error, i fixed the problem with a .love file but when i export it to a .exe it says that the file could not be found!
How could i fix this??
Raptr Studios
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
http://raptrstudios.weebly.com/
Please consider donating to us!
New Game I'm Working On - Cerradon
Who is online
Users browsing this forum: Google [Bot] and 3 guests