Originally Posted by
KevenSimmons
So, I have found the problem I am having with the spell parser. It is a combination of the parsing algorithm and the character set. The parser is programmed to recognize the start of a spell list by looking for two dashes as the divider between the spell level description (e.g. "8th") and the spell list, for example: 8th -- fire storm (DC 25), unholy aura D (DC 25)
The issue I have is that the copy-paste of the source material is resulting in a single, long dash character as the separator: 8th—fire storm (DC 25), unholy aura D (DC 25). The parser does not recognize the character and therefore does not parse the spells. I fixed this by adding a line of code in the "stripString" function that replaces occurrences of the long-dash character with the two single dashes that the parser wants to see:
data = data:gsub('& #151;','--');
Note that there is no space between the & and # in the actual code. I had to put a space in here to prevent the forum from interpreting it as a character code.