-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combined lists and functions don't work as intended #12
Comments
I won’t have access to a computer before the 18th of December, but I’ll investigate as soon as I’m back from my trip. This is a significant issue, thanks for taking the time to provide an example! |
@ephread Any update on this? |
@2shady4u sorry, I haven't had time yet, will look into it in the next few days. I noticed that you compiled the story with inklecate 9.0.0 though, which is not supported by the current runtime. Just to be certain, do you encounter the same behaviour with 0.8.3? |
Update: I checked with two different versions of inklecate. Although the container hierarchy is slightly different between the two versions, it behaves in the same way in the runtime. I will investigate further. |
@ephread Any update on this? If possible we could discuss this on Discord or through mail if that would be better for you? |
@2shady4u sorry, I'm moving overseas at the moment, so I'm a bit overwhelmed. We can get in touch through inkle's Discord (same handle as Github) if you want, but I may take forever to respond. |
OH. MY. GOODNESS. I found the issue, it's so utterly silly that I can't help but be super mad at myself. The equality method between two lists was not implemented, so the switch statement was using the equality method of the parent object (which always returns false). Over the past few months I spent so much time here and there investigating this when I got the chance. But today, I guess I went about the right way. I still need to add a proper test case and I should be able to commit and push a fix. (It's also fixing #13) Sorry it took so long to fix. |
Hello :) I would've tried fixing this myself, but I was swamped with work |
Describe the bug
Passing list elements to a switch function should result in this list element being matched. This is not the case... the function doesn't recognize the element and simply chooses the "else" path.
To Reproduce
OUTPUT in log:
OUTPUT in game:
This is the wrong behavior...
Expected behavior
Go to Quill (http://jeejah.xyz/quill/) or download Inky, copy-paste the Ink content (see below) and press play. This gives following story (which is correct):
Ink files
Here's a minimum version of the *.ink-script that I'm using:
Environment:
Additional context
A current work-around is to not use LISTs and just use string (meaning: {s("P")} instead of {s(P)}), but I would very much like not to write the double quotes at all.
The text was updated successfully, but these errors were encountered: