file not being created in documents

The highscore file is not being created in there documents directory

Max,

Hi.  The open statement may be wrong. Sorry, but I can’t see the end of it.

Try this (spread out to two lines for legibility, on one line is fine):

local path = system.pathForFile( "highscore.txt", system.DocumentsDirectory ) local highScoreFile = io.open( path, "a+" ) 

Relevant docs:

http://docs.coronalabs.com/daily/api/library/system/pathForFile.html

http://docs.coronalabs.com/daily/api/library/io/open.html

PS - It looks to me like you’re doing an open with mode "r"

Max,

Hi.  The open statement may be wrong. Sorry, but I can’t see the end of it.

Try this (spread out to two lines for legibility, on one line is fine):

local path = system.pathForFile( "highscore.txt", system.DocumentsDirectory ) local highScoreFile = io.open( path, "a+" ) 

Relevant docs:

http://docs.coronalabs.com/daily/api/library/system/pathForFile.html

http://docs.coronalabs.com/daily/api/library/io/open.html

PS - It looks to me like you’re doing an open with mode "r"