Hello, everyone! I wanted to create a text message UI on twine and stumbled across Trialogue, which was exactly what I needed. It all went smoothly, until I tried using the code <% story.showDelayed("NextPassageIdOrName"); %> as the documentation had instructed — the error
would pop up whenever the time came for the code to run. I installed the 2.3.9 twine build in the hopes that this was just a version conflict, but the same error occurred when I tried running the same code.
I know very little about javascript, so any help at all in getting this story format to work would be extremely welcome! Thank you for your time!
I’m not familiar with Trialogue or Twine, but I do know some JS. Typically, that error occurs when you are trying to reference something that is undefined. For example, If you try and call story.showDelayed(…) and story is undefined, you will get this error.
The error message points to an html file and a line number, it would be helpful to attach that html file in a gist or pastebin or at least include the relevant lines in your post so that people can see as well.
As implied by @JoshGrams 's question, the String argument you pass to the story.showDelayed() needs to be the Name of a Passage that exists in your project.
note: By default, the Twine 2.x application will not automatically created that Passage for you, unless that specific Passage is also referenced by name in a Markup based Link. Because the application doesn’t know how to recognised Passages that are referenced via Macros or Functions or Methods.