You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When called, the method Show(Character character, string position) will create a new PortraitOptions variable with default values, and later will try to read the "portrait" property of this variable. Since the portrait is never properly set in this method, it will always error on the following two lines:
Changing this Show method to require a string with the name of the portrait, and then setting the "portrait" property of the PortraitOptions variable fixes the issue. This is what the method looks like when fixed:
I thought about submitting a pull request, but I don't know if this method is used by something else, and didn't want to risk breaking someone else's project by changing the API
The text was updated successfully, but these errors were encountered:
vitormaduro
added
the
bug
Doing something it's not meant to, or not doing something it's meant to.
label
Nov 24, 2021
I'm trying to display a character at a certain position on the stage. The character was created properly (with a portrait), and I tried to use the Show method to make the character appear, but the way it is, the method tries to access an invalid portrait. I edited the Show method locally to make it set the portrait according to the character's default character, and it's working properly
When called, the method Show(Character character, string position) will create a new PortraitOptions variable with default values, and later will try to read the "portrait" property of this variable. Since the portrait is never properly set in this method, it will always error on the following two lines:
Changing this Show method to require a string with the name of the portrait, and then setting the "portrait" property of the PortraitOptions variable fixes the issue. This is what the method looks like when fixed:
I thought about submitting a pull request, but I don't know if this method is used by something else, and didn't want to risk breaking someone else's project by changing the API
The text was updated successfully, but these errors were encountered: