When I'm testing the game on Window 7, it loads/saves fine.
When I'm testing the game on Android OS 2.3 using the .apk file, the game can read the file, but can't write anything to it. Do I need to set a certain permission? I've already included the following:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
function loadGame(fileName$ as string)
// reading from a file
OpenToRead ( 1, "game_data.txt" )
game.data$ = ReadString ( 1 )
CloseFile ( 1 )
endfunction
function saveGame(fileName$ as string,stage$ as string, level$ as string)
stageLevelID$=stage$+level$
rem refresh saved data variable
game.data$=stageLevelID$
// write data to a file
OpenToWrite ( 1, "game_data.txt", 0)
WriteString ( 1, stageLevelID$)
CloseFile ( 1 )
endfunction