Hello!
Today I decided to learn how to work with files. I opened corona-blog, and saw the next code
local saveData = "My app state data" local path = system.pathForFile( "myfile.txt", system.DocumentsDirectory ) local file = io.open( path, "w" ) file:write( saveData ) io.close( file ) file = nil
Which is very simple. But Emulator said that something wrong and gave me the next line:
Runtime error d:\corona\project\file\main.lua attemt to index local 'file' (a nil value)
And show that something wrong in the file:write( saveData ) string.
Also I started the FileDemo example and it said the same.
Is it something wrong on my computer, or I just mist something?