(I'm using Harlowe.)
According to
http://twinery.org/wiki/function, I should be able to use built-in functions listed on the page in expressions. But if I include something like:
[[link->previous()]]
in my story, the story literally creates a link to a passage called "previous()".
And if I try to use other functions, like, say, turns(), with the following statement:
(print:turns())
I get the following message when I try to play my story:
turns is not defined
The editor's only help for this issue is:
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.
I don't even understand why I'm getting this message, since I'm not using a browser to test my story. I'm using the local version of twine for Windows that you can download from the Twine website.
How can I get Twine to recognize these functions?
Comments
Each story format defines it's own list of macros, the syntax (format) of those macros and what features the story format supports.
Harlowe has a (history: ) macro which can be used to determine the passage name of the previously shown passage. ... unfortunately the Twine 2 application does not understand advance markup links like the above and it will automatically create a new passage with an incorrect passage name.
One way to get around this problem is to use the (link-goto: ) macro: You can use the length property of array returned by the (history: ) macro to achieve the same result as the above: The installable version of the Twine 2 application contains a built-in custom web-browser, so you are using one when you Test/Play your story.