Wayfinder
Wayfinder copied to clipboard
Trying to fix the crash on spellbook
Probably the main cause for the crash was the level attribute that was set to blank and the casting to int was failing.
Also, Cantrips wasn't being selected, since it was looking for the wrong attribute. Maybe subtype is a new thing.
I don't have a way to test, but maybe the following is a even better solution:
int spell_level;
var sps = from sp in spells where int.TryParse(sp["level"], out spell_level) &&
(string)sp["subtype"]=="spell" &&
spell_level == i