Wayfinder icon indicating copy to clipboard operation
Wayfinder copied to clipboard

Trying to fix the crash on spellbook

Open luizbgomide opened this issue 4 years ago • 1 comments

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.

luizbgomide avatar Feb 06 '21 13:02 luizbgomide

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

luizbgomide avatar Feb 06 '21 13:02 luizbgomide