I’m trying to add an increment system on a variable in chapbook.
Let’s say I have the variable money set to 10 (money: 10) and i want on next passage to increase it by 1.
Looking at the documentation I should do money: money + 1 but when I do that I end up with money = 101 instead of 11. And if I continue it’ll just go 1011, 10111 etc…
BUT when I do money: money - 1 it’s working and print money = 9… What’s going wrong ?
Sounds like it’s treating it as a string: + is used both for adding numbers and appending to strings. But if you subtract, then - is only used for subtracting numbers so it treats it as a number.
I’m not sure why it would be a string in the first place: can you share which version of Twine and which version of Chapbook you’re using? And copy/paste your exact code so we can see it?