Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

'string is not a function'

$
0
0
Getting this error likely because I've formatted the conditional check incorrectly. I'm checking to see if the last page visited was 'leave'. If so, show Text, otherwise, show Other text. What's the correct syntax?

This is currently incorrect:
<% if (story.checkpointName() == 'leave'){ %>
Text
<% } else { %>
Other text
<% } %>

So would it be:
<% if (story.checkpointName('leave')){ %>
Text
<% } else { %>
Other text
<% } %>

Or:
<% if (Story.checkpointName('leave')){ %>
Text
<% } else { %>
Other text
<% } %>

Or something entirely different? I'm stumped even after browsing the commented source.

Viewing all articles
Browse latest Browse all 1844

Trending Articles