Is there a proper way to code these? 🤔

  1. command goto after label:

label 1
…
…
…
…
goto ending

or

  1. two consecutive goto command
    choice
    “option 1”
    {if(x)
    goto 1
    goto ending
    }

To lead the goto to the label, both have to share the same name. It doesn’t matter, goto command can go after and before the label.

Having consecutive goto commands just doesn’t serve the purpose because the system reads the first line before going to the second. Basically, the second goto will be skipped because it will reach the first goto and lead straight to the label with the same name.

There’s actually a thread about label and goto:

1 Like

I did try putting goto command after the label but it doesn’t work.

Error Unexpected GOTO: (u’ending, False)

**ending is the label name

Try to add another } after the last } under the goto.

choice
“option 1”{
if(x) {
goto label
} else {
goto ending
}
}

If branching commands need their own set of braces. The choice command also needs its own set of braces. Since the if command is in the choice command, if command braces are inside the choice command braces. You can’t throw either one of them.
Oh BTW, two goto’s in a single branch makes no sense. Unless you add a label before the second goto command, readers won’t use that goto either way.

It doesn’t work because you can’t put goto after the label without anything between it.
Just put @pause for 0 between it if you don’t intend to put any scenes/dialogues.

label ending
@pause for 0
goto ending

thank you :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.