Create file in localization of app
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Create file in localization of app
love.filesystem.newFile(love.filesystem.getSource( ).."file.txt") that don't working :/
Re: Create file in localization of app
Just do love.filesystem.newFile("file.txt")
Re: Create file in localization of app
Well you can't. There's a solid number of very good reasons for that, trust me, it's better that way and saves you a ton of trouble on weird issues.
Re: Create file in localization of app
Oh I can use lua functions ... http://lua-users.org/wiki/FileInputOutput
Re: Create file in localization of app
raidho36 is correct, you don't want to write in the install folder and depending on the user's permissions it might not work at all.
Also, please note that "localization" is something entirely different as opposed to "location".
Also, please note that "localization" is something entirely different as opposed to "location".
Re: Create file in localization of app
Lua functions won't work if you make a .love file. They may work but you probably won't easily know where the file ends up. They're not even guaranteed to work if you run the project as a folder.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Create file in localization of app
So it's impossible to read info from .txt file in same folder where is app?
Re: Create file in localization of app
App folder is read only, you can't write to it. If the project runs from fused file or compressed package, then the package is accessible instead of folder.
Who is online
Users browsing this forum: No registered users and 1 guest