Skip to content

Trying to fix the crash on spellbook#20

Open
luizbgomide wants to merge 1 commit into
yoshisman8:masterfrom
luizbgomide:patch-1
Open

Trying to fix the crash on spellbook#20
luizbgomide wants to merge 1 commit into
yoshisman8:masterfrom
luizbgomide:patch-1

Conversation

@luizbgomide

Copy link
Copy Markdown

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.

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

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant