but it causes the game to freeze. Taking the above code out means everything works fine. I know the path is correct because
print(os.getenv("HOME"))
gives me /Users/joshrackstraw. What am I doing wrong? I’m on MacOS and the goal here is to create a file in a common location that can be opened by two different apps created in defold.
Have you tried loading the file from ~/Library/Application Support? I’m in Windows land so for me it’s %Appdata%. If you use something like
local path = sys.get_save_file(string.gsub(sys.get_config('project.title'), '%s+', ''), 'filename')
And then save off some data to that path, then you can replace that file with your own data and then load it from a place where permissions hopefully won’t be an issue.