Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Simple math in Twine 2

I'm using Twine 2 and I can't figure out how to do the most basic thing: add numbers. I've tried the following and am getting this error: Requested prototype of a value that is not an object.

In one passage:
(Set: $var to 5)
The following passage I want to add to that var and none of the following works:
(set: $var to it + 1)
(set: $var to $var + 10)
(set: $var = ($var + 100))
(set: $var to ($var + 1000))
How do I do this simple addition?

Comments

  • The version of the Harlowe story format currently being used by the Twine 2.0 beta has a bug which is causing the error you are seeing and is why you are not able to do arithmetic. The bug has been fixed in the Harlowe bitbucket repository.

    The four different arithmetic examples you supplied should all work once a new version of Harlowe is incorporated into a future release of Twine 2.0 beta.
  • OK, thanks for the reply greyelf!
Sign In or Register to comment.