Trying to save highscore in json file but file error No such file or directory

Hello everybody! I’m trying to save my highscore but i see error  File error: C:\Users\romlu\AppData\Local\Corona Labs\Corona Simulator\Sandbox\stand out-5004F908333A8F9EE4A9B4F8532E8EA1\Documents\highscore.json: No such file or directory

I just open the file and trying to write information in it and read the content but i see this error. Help me please.

This is a part of my code.

https://paste.ofcode.org/yFR7MNnFpT3rWUPufbZDzp

Hello, you must open the file with “w” parameter until you want to write to the file:

local file, errorString = io.open( path, "w" )

Hi

But if i want to get highscore from file and i have the same error as i am trying to write the file - file not found

If you’re interested, my Puggle library makes saving data such as high scores very easy:

https://www.grahamranson.com/saving-high-scores-with-puggle/

Thanks, your library is very useful, it really helped me!

Glad to hear it!

Hello, you must open the file with “w” parameter until you want to write to the file:

local file, errorString = io.open( path, "w" )

Hi

But if i want to get highscore from file and i have the same error as i am trying to write the file - file not found

If you’re interested, my Puggle library makes saving data such as high scores very easy:

https://www.grahamranson.com/saving-high-scores-with-puggle/

Thanks, your library is very useful, it really helped me!

Glad to hear it!