I'm trying to make the main character's name/title/style of address, etc. change based on choices at the beginning of the passage, but I'm running into the "X is not defined" error.
(set: $name to (prompt: "What is your name?", "Aldrovanda"))
WARNING:
The following looks like it should work—note the corrected syntax within the (set:) macro—however, it does not:
[[Aldrovanda(set: $name to "Aldrovanda")->Pleased to meet you.]]
The reason is because the (set:) within the link markup is evaluated when the link is created, not when it's clicked on by the player. In other words, it's essentially the same as the following:
[[Aldrovanda->Pleased to meet you.]]\
(set: $name to "Aldrovanda")
Comments
<<textinput>> looks like sugarcube (except it isn't - the sc version is textbox). but you're using harlowe.
Also, I think you may need to (set: $name to "") before you call any of the other stuff.
In order of what you were trying:
Via a link, using the (link:) macro, (set:) macro, & (goto:) macro:
Via a input, using the (prompt:) macro. For example:
WARNING:
The following looks like it should work—note the corrected syntax within the (set:) macro—however, it does not: The reason is because the (set:) within the link markup is evaluated when the link is created, not when it's clicked on by the player. In other words, it's essentially the same as the following: Which is not what you're looking to do.