Getting an error parsing my savegame files after a few game variables are set.
Error while parsing XML data: at System.String.IndexOf (Char value, Int32 startIndex, Int32 count) [0x00013] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/String.cs:1114
at ORKFramework.XML.XMLParser.Parse () [0x00000] in :0
The flow is:
1. execute some scenes
2. save game
3. reload
This flow works correctly until i pass a certain point in my game, after which I get the error on loading a game which was saved from that point on.
I tested with the following code, as well:
public static void TestXMLParse(string file)
{
var parser = new XML.XMLParser(File.ReadAllText(file), new AssetLookUp());
parser.Parse();
}
It seems like there is some non standard xml in the file so it is a bit hard for me to see what the issue is.
https://mrochon-public-images.s3.amazonaws.com/savegameAUTO.save
Can you tell me some details on the variables you're setting? Mostly their variable keys and the value of string variables.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
var useBattleTutorial: bool
var alreadyShowedAttackTutorial: bool
Saving and loading before scene 3 starts works fine.
Saving and loading after scene 4 ends, fails.
Scene 3 leads into a battle tutorial, scene 4 is the scene after the battle ends. There is no opportunity to save in between or during.
I'd be happy to debug the file to identify at least exactly where it is failing, but the xml parser doesnt have any options to print out more detailed information. if you want to send me a core dll for 2.24.1 with some debug logging on the xml parser i can try that.
The other option would be to send me just the xmlparser cs file privately and I can step through it.
As always I am happy to help, or wait if needs be.
Edit: Alright, seems like having a '-' in a scene name causes trouble ... or at least if it's used with spaces, e.g. '1 Town' is working but '1 - Town' isn't.
Will fix this in the next update.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Edit: Confirmed scene rename fixes the issue. Thanks for tracking that down!