// 1. save game
DataObject setting = ORK.Game.SaveGame();
// I want get the string ( or json ) of setting
// 2. Loda game
// I want create the setting1 object from a string .
ORK.Game.LoadGame(setting1);
It looks like you're new here. If you want to get involved, click one of these buttons!
// 1. save game
DataObject setting = ORK.Game.SaveGame();
// I want save the string ( or json ) data
string json=JsonMapper.ToJson(setting);
// 2. Loda game
// I want create the setting1 object from a string .
JsonData jsonData1 = JsonMapper.ToObject(json2);
ORK.Game.LoadGame(setting1);
dataObject.GetDataFile(string namespace, bool encrypt).GetXML();
To create a DataObject from the XML string, you can use this code:
DataFile dataFile = new DataFile(string namespace, bool encrypted);
dataFile.SetXML(string xml);
DataObject dataObject = dataFile.ToDataObject();
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
<?xml version="1.0" encoding="utf - 8" ?>
but that yields the same error.
w.GetName()
was returning "Black Sword" which created an invalid XML:
<Black Sword animationID="0"...
So in theory, ORKDataFile::GetXML() should remove whitespace from its name before returning the XML
The name you use for creating the data file doesn't really matter much, using the actual name of the weapon isn't a good idea. Just use something like "weapon" to know what kind of data is stored there.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!