After I write a file. I cannot find it using Windows Explorer. (I have `show hidden files' in the Explorer's settings as well)
but the program is able to read the file that I have no idea where it is!
This is the write code:
// Project: Example
// Created: 2017-05-03
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Example" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
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 ) // since version 2.0.22 we can use nicer default fonts
OpenToWrite(1,"example.dat")
WriteInteger(1,102)
CloseFile(1)
//OpenToRead(1,"example.dat")
//number=ReadInteger(1)
//CloseFile(1)
do
Print( ScreenFPS() )
//Print(number)
Sync()
loop
and this is the read code:
// Project: Example
// Created: 2017-05-03
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Example" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
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 ) // since version 2.0.22 we can use nicer default fonts
//OpenToWrite(1,"example.dat")
//WriteInteger(1,102)
//CloseFile(1)
OpenToRead(1,"example.dat")
number=ReadInteger(1)
CloseFile(1)
do
Print( ScreenFPS() )
Print(number)
Sync()
loop