Is there any way possible to include a function inside an if statement?
Say if I have something like this:
(if: introcheck is 0)[(set: ($name) as (prompt: "What's your name?"))]
When I run the game, it says something like this:
☕ Unexpected identifier►☕ Unexpected identifier►
Help!
Comments
a. your introcheck variable is missing a dollar sign at the start, this results in the first Unexpected identifier error.
b. you have unnecessary brackets around the $name variable.
c. you are incorrectly using an as operator to do an assignment, when it should be a to operator.
Try the following:
note:
If the $introcheck variable is meant to track if something has occurred or not, then you should use a boolean value (true/false) instead of 0 and 1.
Initialize the variable in your startup tagged passage like so: ... and change the check to be:
Try something like the following: