sorry if I missed this but so far the only way I see to store data would be via INI files (INI object). Are there other ways that I'm missing? I was hoping for support of XML but the two XML extensions aren't supported in the Droid Beta.
Printable View
sorry if I missed this but so far the only way I see to store data would be via INI files (INI object). Are there other ways that I'm missing? I was hoping for support of XML but the two XML extensions aren't supported in the Droid Beta.
I would assume you could save the content of an Edit object, but I cannot get that to work. I don't know where (or if) the file is saved.
A way that definately works is to store data on a webserver if you have one and know how to progam it. Then you would use the GET object to communicate with the server.
Thanks but won't work. I shoulld have been clearer in my post. I want to store the data locally. For example, store user config settings. It doesn't need to be secure (I.e. encrypted). The data being stored is not sensitive. Looks like the INI object may be the route I will have to go.
Yes, ini is perfect for that :)
Just researched INI vs XML. Found out there's a limitation on INI values. Values characters can be no longer than I believe 256 characters. I was going to use the INI to also store info such as definitions. The original app I'm developing (PC version) uses an XML file to store the values, definitions, etc.
That's not true (at least on Android).
Sorry to be a total noob here but could someone give me a quick run down on how to use the ini object?
I've never actually used it, I use associative array on normal MMF2.
How do you create it initially on the device?
What's the command to say set item difficulty to 3.
How would I read that back off the ini for example at start of frame read difficulty and set a global value to it?
Sorry if they sound like dumb questions but my experience with this is 0.
First you have to set the ini file name. If you want to call the file name mygame, then you could do:
At Start of Frame > Set Current File "mygame.ini"
This would create the file mygame.ini in the same directory as your application.
There is no "command." INI files are just plain text such as this:
[Settings]
Difficulty=3
[Settings] is the group. Difficulty is the item and 3 is the value. So you could create whatever you want in your game.. Maybe even put it in a group if a lot of things. At startup, disable the group. Then, set a condition. Compare two general values:
If ItemValue("INI","Difficulty")=3
Enable MyGroup
Replace MyGroup with whatever you want to call your MMF group. This is not to be confused with the INI groups previously-mentioned. In the Multimedia Fusion 2 Help folder is a file called Ini.chm. That is the help file for the INI object. It explains a bit more about the groups, items, etc. I would really like to see support for the INI++ object.
Thanks. I'll give that a go.
Note that the INI object creates a virtual file on Android, not a real one (I believe it's the same with iOS).