How to print the value of a variable + 1

Twine Version: Sugarcube
Story Format: 2.3.14

Hi, hopefully a quick one. I’m familiar with printing the value of a variable in my story, e.g. “You have lost $livesLost lives”. Is there a neat way to print the value of a variable + 1, so basically 1 more than the value of the variable? (I know it could be done easily enough with a second variable, I just wondered if there’s a neater way)

Many thanks in advance!

The simplest is to use the abbreviated version of the <<print>> macro, the <<=>> macro, like this:

<<= $someVar + 1>>

Assuming that $someVar is a number, that will print out the the value of $someVar + 1.

Enjoy! :slight_smile: