Hi,
I've tried using Save & load a table script but it didn't work, I've narrowed it down to this simple snippet which doesn't work:
file = io.open( "test.txt", "w" )
file:write("somestring")
io.close(file)
Basically anything I save to file is not saved there, even if file is not created, is created, is created and added to Gideros project. Do I miss something? Any permisions?
I'm running Windows 7 32bit with Gideros v2011.9 beta3
P.S Reading from files works
Comments
http://www.lua.org/manual/5.1/
How can I do that and would this folder be visible in mobile phone?
BTW: How can I style code when posting it here?
There are two types of file access in Lua. "Simple" and "Complete" I/O model. Complete I/O model have more control over I/O and also it's simple to use. Therefore, you can simply omit Simple I/O model and directly use Complete I/O model always. Here is a simple example of Complete I/O model:
Here is the documentation about file system of gideros: http://www.giderosmobile.com/documentation/file_system.html (but the examples in this document use Simple I/O model)
You can write your code inside this:
<pre lang="lua">
</pre>
Likes: ar2rsawseen, jeromegsq
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps