rect
Member
|
TextData cannot save at android platform
Hi all,I use TextData to save my game config at Android device.my code is like:
Code:
int nRect4 = 0;
void SaveSettings(TextData &data)
{
TextNode &sv=data.getNode("Rect");
sv.getNode("Rect4").value=S+4;
}
void LoadSettings(TextData &data)
{
if(TextNode *sv=data.findNode("Rect"))
{
if(TextNode *n=sv.findNode("Rect4"))
{
nRect4 = n.asFlt();
}
}
}
void SaveSettings(C Str &name="Settings.txt")
{
TextData settings; SaveSettings(settings); settings.save(name);
}
void LoadSettings(C Str &name="Settings.txt")
{
TextData settings;
if(settings.load(name))
LoadSettings(settings);
}
I call SaveSettings(),and LoadSettings().
at win platform nRect4 is 4
at andrpid platfomr nRect4 is 0
my question is:
1.why?
2.Is TextData cannot save file in android device?
thanks.
|
|
06-02-2015 05:04 AM |
|
Esenthel
Administrator
|
RE: TextData cannot save at android platform
|
|
06-02-2015 05:51 AM |
|
rect
Member
|
RE: TextData cannot save at android platform
thanks.
|
|
06-02-2015 07:15 AM |
|