Skip to content
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

Cannot read properties of undefined (reading 'getAttribute("name")') #2

Open
gimli2 opened this issue Jul 27, 2024 · 1 comment
Open

Comments

@gimli2
Copy link

gimli2 commented Jul 27, 2024

When switched story format to the Primitive 0.2, the story cannot be tested/played. In the dev tools console you can see:

Book:194 Uncaught 
TypeError: Cannot read properties of undefined (reading 'getAttribute')
    at Book.html:194:19241

which points to the last line of this part of story JS:

let _truepassagenames = function(text) {
                            let passages = text.split(" --\x3e ");
                            return passages = passages.join("\n"),
                            passages = passages.split("\n"),
                            passages.shift(),
                            [...new Set(passages)]
                        }(function(psg) {
                            let connections = []
                              , scanned = [psg.getAttribute("name")]

What could be configured improperly?

using:

  • Twine 2.9.1 on linux
  • Primitive-StoryFormat v 0.2.0

The tag "start" was added to the first passage.

@leahiel
Copy link
Owner

leahiel commented Aug 10, 2024

Looks like, according to that error, the Parser didn't add your start passage to its list of passages.

There's a few things that could be an issue.

  • The start tag parser code isn't working in Parser, which of course makes the README a liar.
  • Primitive has an incompatibility with Twine 2.9.x, which I would need to look further into.
  • Primitive has an incompatibility with Linux, which I don't even test on.

Would you be willing to share your Story code, if you still have it, so I can look into this more?
Additionally, have you tried compiling the included test story?

PS. Sorry for the late reply, you can always find me faster at the Twine Discord. I'm currently in intensive training, so I won't be keeping a tab on peripherals like GitHub for another few months.

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

No branches or pull requests

2 participants