Requesting Help For Javascript Error in Trialogue

Twine Version: 2.10.0
Story Format: Trialogue

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

Uncaught TypeError: Cannot read properties of undefined (reading 'source') (file:///D:/Documents/Twine/Scratch/test-c75cca00-009f-4a1b-b6e8-964999d6bc5d.html: 160)

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!

Probably a stupid question but do you have a passage named “NextPassageIdOrName”? Or are you using a valid passage name there?

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.

Could be as simple as one of those uppercase being lowercase for the passage in your story. Check it out.