In my game I will let the users create their own levels.
At moment I know how to save the created levels (they are created inside the save directory).
The problem is that I will need to list the created levels to let the user choose one of them, but when I use the function love.filesystem.getDirectoryItems() it shows only the files that are inside the main folder (where is the main.lua). From the save directory the function returns a empty string.
Can someone pls point me how can I get the files from the save directory? Or if it is not possible, is there some way I could save the levels inside some other folder?
I save the created levels using this code:
Code: Select all
love.filesystem.write(name_of_level..".lua",serialize(level_table))
But I would like to know why I can not get the list of files from the Save Directory using love.filesystem.getDirectoryItems()
Thank you in advance!
Uederson