Default roaming folder not created

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
totalvamp
Prole
Posts: 3
Joined: Sun Mar 20, 2016 11:47 pm

Default roaming folder not created

Post by totalvamp »

Hi, I'm trying to make a save file system, but I can't access the default folder.

It isn't created when calling the script so there is no save folder to go to.

Code: Select all

C:\Users\<username>\AppData\Roaming\LOVE
This folder does not exist and does not get created when running the game (starting in console).

I created it by hand now, but even then I can't make a new folder inside with mkdir

Is there any way to let the game make this folder?

This is the current code:

Code: Select all

function loadGame:enter()
    local files = ''
    love.filesystem.mkdir("SpaceSim")
end
It will give the "attempt to call field mkdir (a nil value)
User avatar
slime
Solid Snayke
Posts: 3133
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Default roaming folder not created

Post by slime »

The save directory won't be created until a file or folder is created by LÖVE.

love.filesystem.mkdir was renamed to [wiki]love.filesystem.createDirectory[/wiki] a couple years ago, in version 0.9.0. If you're using a tutorial and it's telling you to use the old function, it's probably a good idea t look for a newer tutorial.
totalvamp
Prole
Posts: 3
Joined: Sun Mar 20, 2016 11:47 pm

Re: Default roaming folder not created

Post by totalvamp »

slime wrote:The save directory won't be created until a file or folder is created by LÖVE.

love.filesystem.mkdir was renamed to [wiki]love.filesystem.createDirectory[/wiki] a couple years ago, in version 0.9.0. If you're using a tutorial and it's telling you to use the old function, it's probably a good idea t look for a newer tutorial.
That was the problem, I was trying to read files inside the save file folder to check for save files (I will use separate files for every save), but since the directories did not exist yet, it would throw out an error.
Post Reply

Who is online

Users browsing this forum: No registered users and 205 guests