+1 vote
by (170 points)

I'm still really new to Twine, but I'm using Harlowe 3.0.1, and when I copy/paste the example prompt usage from the Harlowe 3.0.1 manual into my story:

(set: $name to (prompt: "Your name, please:", "Frances Spayne"))

I get an error message that reads:

☕ prompt() is and will not be supported.►
This error message was reported by your browser's Javascript engine. I don't understand it either, but it usually means that an expression was badly written.

So I suppose my question is this - am I doing something wrong, or am I just misunderstanding something here?

2 Answers

+1 vote
by (63.1k points)
This is a bug in the application version of Twine 2. See: https://github.com/klembot/twinejs/issues/545

The macro will work pretty much everywhere else outside the app.
0 votes
by (159k points)

When reporting error messages it can help if you state how you were viewing your story when you recieved the error, do this allows us to know the possible conditions that the error occurs in.

eg. Were you using the Twine 2 application's Test or Play options, or were you viewing a story HTML file you created via the Publish to File option.

The Twine 2 application is built using a framework named Electron, and this framework is what is providing the custom web-browser used by the application's Test and Play options. It appears that this custom web-browser doesn't include the standard JavaScript window.prompt() function which Harlowe's own (prompt:) macro relies upon, which is why you are recieving the error message that you are.

If you use the application's Publish to File option to create a story HTML file and view that file within your web-browser your (prompt:) macro related content should work correctly.

note: The developers of both the Twine 2 application and the Harlowe story format have been made aware of this issue.

...