inkle/ink

Variable is not included in the choice if it is in the start of the choice

Closed this issue · 1 comments

I am very new to Ink, just started using it 20 mins ago, watched a few tutorials and wrote something in it, but I came across an issue, VAR is not included in the choice if it is in the start of the choice

VAR saidPrice = 10
Can I buy this item for {saidPrice} bucks?
* {saidPrice} is not enough.
* no problem.

in the ink interface it shows something like this:

Can I buy this item for 10 bucks?
- is not enough.
- no problem.

but it should be something like this:

Can I buy this item for 10 bucks?
- 10 is not enough.
- no problem.

how can I solve it?

ink is interpreting the variable as a condition. You can tell ink that the content of the choice has begun using a backslashed whitespace character (a \ followed by a space)

  • \ {varName} is the price