i am writing a game that requires a high score to be saved. everything else in the game is tested on an android device and works fine. the only problem i am having is with the read() function. iv determined this by commenting out sections of code and pinpointing the exact line that makes it crash. to me make it more difficult it works fine in the simulator it just crashes on the actual phone. here is the section that is making it crash
local path = system.pathForFile( “HIGHSCORE.txt”, system.DocumentsDirectory )
local file = io.open( path, “r” )
local displayhighscore = file:read("*n")
am i doing anything wrong in the read("*n") part? any help would be greatly appreciated,
thanks!