It looks like you're new here. If you want to get involved, click one of these buttons!
<% if (story.checkpointName() == 'leave'){ %> Text <% } else { %> Other text <% } %>
<% if (story.checkpointName('leave')){ %> Text <% } else { %> Other text <% } %>
<% if (Story.checkpointName('leave')){ %> Text <% } else { %> Other text <% } %>
Comments
To answer the question, neither. checkpointName is not a function but a property of the type string - as your error message suggests - so you don't call curly brackets. What you wanna do is:
Anyway, thanks for the clarification, looking at the comments I do in fact see that it's a string. Makes a lot more sense to me now, however the expressions themselves aren't executing. You mentioned not needing curlies? How then would I format a conditional statement if not using the above structure? I'm very new at this, and I've been using the above conditional format based on this question.
Thanks for looking at this.
EDIT: Looks like I still have work to do. I read up on setting the checkpoint as it needs to be done manually, works out now. Still, could you clarify what you meant by not needing curlies?
Stupidly complex explanation: { and ( and [ look way too similar when you're tired and have been staring at code too long. So my internal monologue is associating everything bracket-y with the phrase 'curly brackets' and relying on the editor to tell me which ones are which. I forgot they have a real name.
Happens to the best of us lol. Thanks so much for your help, both of you.