neilgfoster
May 10th, 2012, 17:01
Hi All,
Not really an issue I suppose for FG2, but I thought that I would mention it anyway.
I have a ruleset where I allow each player to keep their own notes. I store the notes under a node in the database called 'notes.<username>' where <username> is retrieved using User.getUsername();
This seemed to work fine, until a player used invalid characters in their username (such as brackets). FG2 happily used the username for the node name, and wrote the node to the db.xml upon exit. However, when attempting to load the campaign again FG2 complained because the XML now had validation errors as there were invalid characters in an xml node. This caused FG2 to error, backup the database, and then create a blank database - making it appear as though the campaign had been lost. I had to fix the campaign by restoring the backup and manually removing the invalid nodes.
I have worked around this by stripping out invalid characters using:
string.gsub(username, "([^/A-Za-z0-9_])" , "_")
Thought that I'd point this out in case anyone else hits the same issue.
Not really an issue I suppose for FG2, but I thought that I would mention it anyway.
I have a ruleset where I allow each player to keep their own notes. I store the notes under a node in the database called 'notes.<username>' where <username> is retrieved using User.getUsername();
This seemed to work fine, until a player used invalid characters in their username (such as brackets). FG2 happily used the username for the node name, and wrote the node to the db.xml upon exit. However, when attempting to load the campaign again FG2 complained because the XML now had validation errors as there were invalid characters in an xml node. This caused FG2 to error, backup the database, and then create a blank database - making it appear as though the campaign had been lost. I had to fix the campaign by restoring the backup and manually removing the invalid nodes.
I have worked around this by stripping out invalid characters using:
string.gsub(username, "([^/A-Za-z0-9_])" , "_")
Thought that I'd point this out in case anyone else hits the same issue.