Page 1 of 1

Help with love.filesystem.write

Posted: Tue Aug 29, 2023 10:38 am
by ttmso
I'm making a game and it keeps giving a error when i try to save a file there "Could not open file maps/test.json (not found)".
The folder/file exists and the file ident is the folder that the files are in, btw my OS is Windows 10 Pro

Here is the line that give that error:
local success, error = love.filesystem.write("maps/" .. name .. ".json", map_)

Re: Help with love.filesystem.write

Posted: Tue Aug 29, 2023 11:55 am
by pgimeno
Löve can and will only write to save directories. Are you sure the folder "maps/" exists in the save directory?

You can find out which directory is the save directory by placing this at the top of main.lua and observing the error message:

Code: Select all

error("The save directory is " .. love.filesystem.getSaveDirectory())