0 votes
by (140 points)

2 Answers

0 votes
by (63.1k points)
It was never in Harlowe, to my knowledge. For better or worse, Harlowe uses (prompt:) instead.
by (140 points)

OK I looked up what looks like a simple formula for this as follows:

 

(put: (prompt: "What's your name?") into $name)
Your name is $name.
 
It isn't working.  Is there a simple formula that works that I can use?
by (63.1k points)
Answered in the separate question you wrote.
0 votes
by (159k points)

As explained by @Chapel Harlowe (1.x or 2.x) has never had built-in support for entering text using standard HTML input related elements, it has always relied on the use of the (prompt:) macro.

@csalzman discovered a hack (1) that relied on Javascript, a (live:) macro, and an undocumented behaviour (2) to update a story variable with the value entered into an input element. Harlowe 2.x was changed so that the undocumented (and seemly unintended) behaviour was removed, which results in @caslzman's hack no longer working. (as it is currently implemented)

(1) which some other people improved upon later in that thread.
(2) the ability to assign the current contents of a named hook to a story variable.

by (140 points)

I found a simple formula on the web as follows:

(put: (prompt: "What's your name?") into $name)
Your name is $name.

This doesn't seem to work.  I get the statement:

The (prompt:) macro needs 1 more value.â–ºThe (prompt:) macro must only be given a string, and a string, in that order

 

Any ideas?

by (159k points)

You need to use the Question Tags to indicate the name and full version number of the Story Format you are using, as answers can vary based on that information. Based on the error message you are receiving when using the (prompt:) macro I will assume you are using the 2.x series of Harlowe. (eg. v2.0.1)

As explained in the (prompt:) macro's documentation for that series you need to pass two String parameters to that macro, the documentation even includes an example of how to use the macro and how to assign that macro's return value to a story variable.

It is a good idea to read the documentation for the Story Format you are using.

...