Settings containing '#' cannot be loaded
openmw quits with the error message that the file cannot be loaded, when reaching it in the loading queue on startup. In the error message the name of the file up to the letter before the # is printed.
#9 Updated by AnyOldName 3 over 1 year ago
I think I've learned how to fix this without completely overhauling everything, but there's a decision that needs to be made regarding when the hash character '#' starts a comment, and when it should be interpreted as part of an option.The current situation is that Boost interprets anything between a hash and the next line break as a comment. This means we can't use it in options. There are a few alternatives possible:
- Make it possible to precede a hash with some escape sequence so it doesn't count as a comment. If done robustly, this could be the most flexible.
- Make a decision that a hash only counts if it's at the start of a line (either as the first character or first non-whitespace character). This would match how the launcher behaves.
- Make it so hashes will be considered data when used in a data= or content= line. Personally, I don't like this as it'd add a lot of complexity to the required code, and also add to maintainance more, as we'd need to keep track of which options had this rule.
For now, the middle option is probably simplest to implement, so I'll get started on that, and can switch to another option if someone with authority wants something different.
#12 Updated by AnyOldName 3 about 1 month ago
- Subject changed from Esp files containing the letter '#' in the file name cannot be loaded on startup to Settings containing '#' cannot be loaded
- Status changed from Closed to Confirmed
- Target version deleted (
I just looked, and apparently, I never fixed this for the CS or for the
fallback=key,value lines. Hopefully, I'll have that sorted out by the end of the day.