It looks like you're new here. If you want to get involved, click one of these buttons!
You've acquired a heart
{
(set: $heart = $heart + 1)
}
In the next passage I wanted to test if it worked but it doesn't seem to show
(if: $heart = 1)[You have the heart]
(elseif: $heart < 1)[You don't have the heart.]
I've written the code based on my previous knowledge of how twine's old syntax worked but it doesn't seem to work for twine 2. Could I get some guidance on how I would write this? Sorry if this has been answered before, I tried looking for an answer but got rather confused.
Comments
Because of the format of your macros I am assuming you are using Harlowe, its documentation can be found here
The issue is that you have used a single equals sign (=) in your (if: $heart = 1) statement, as a single equals sign means assignment so you are actually assigning the value of 1 to the $heart variable.
In Twine 1 you could of replaced the single equals sign (=) with a double equals sign (==) but in Harlowe you will need to use an "is".