so i was messing around trying something for another project and i noticed that in this code when i try to opentoread on the second go it says file not found?
SetErrorMode(2)
// set window properties
SetWindowTitle( "ghjghj" )
SetWindowSize( 1024, 768, 0 )
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
// set window properties
global teststring as string
global done as integer
global textid as string
textid = "test.txt"
fileID = OpenToWrite(textid , 0)
fileread = OpenToRead(textid)
global readtest as string
readtest = "failed"
WriteLine(fileID, "this is a test")
CloseFile(fileID)
teststring =ReadLine(fileread)
closefile(fileread)
readtest =ReadLine(fileread)
closefile(fileread)
do
print(teststring)
print(readtest)
sync()
loop