What's wrong with my code?

So I have this choice in my story where the readers can choose which question or questions to ask. Based on choices made previously with a character (Marquise), the main character either gets to ask from 1-3 questions out of six questions (+ one other option).

Everything works really well before the choice to ask questions; the if statement before it, which is the same as the “if: ASHM3 >= 1” one except with [join] rather than jumps and one bit of narrator text for each if.
What doesn’t seem to work is everything under the choice’s join.

Here's my code


What have I done wrong?

Hey there :slight_smile:
What I see right away:

A few [give … are missing the :
so it’s [give: …]

Then for formatting, I’d put the [give: QUESTION_N] on the same line as the [limit: 1]

As basic looping question code can be like this example:

-> loop_start

:loop_start

* [if: ASK = 3] -> end_loop
* [else] -> questions

:questions

What would you like to ask?
* [limit: 1][give: ASK] Q1 -> q_one
* [limit: 1][give: ASK] Q2 -> q_two
* [limit: 1][give: ASK] Q3 -> q_three
* I have no questions. -> end_loop

:q_one
content for q_one

-> loop_start

:q_two
content for q_two

-> loop_start

:q_three
content for q_three

-> loop_start

:end_loop
Story continues

This way, the reader can only choose 3 questions (you can add more than 3 of course) and will automatically be transferred to the :end_loop once the counter for ASK is at 3

Hope this helps :slight_smile:

2 Likes

Thank you so much! I’ve rearranged it all and it seems to be working now. Thanks again.

2 Likes