So I was testing a game im building in order to learn the language a little better and practice in general. After running my slide 3 times in a row to test it I got :caves line 10: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block. Where did I go wrong here?
And this is my code. Im using notepad++
*label lost
*label caves
*choice
#Go into the random dark?
*rand diceroll 1 12
*if diceroll > 3
*set health %-5
A spider bit the hell out of you
*goto caves
#Did you want to just leave?
*rand diceroll 1 2
*if diceroll > 1
*goto lost
*else
*goto_scene home
I think you’re gonna need an else statement there regardless of whether implicit control flow is on or not or whether it’s choice or fake_choice. Otherwise, I’m pretty sure you’d just get a different error rather than no error.
This looks janky and I looked at whatever implicit control flow is, I dont think thats what I was looking for but I for sure appreciate it because it gave me the idea to make this janky code I could also be using that same thing you told me and not know it. Either way you helped I got it working @quartz
type or paste c*label lost
*label caves
*choice
#Go into the random dark?
*rand diceroll 1 12
*if diceroll > 3
*set health %-5
A spider bit the hell out of you
*goto caves
*else
*goto lost
#Did you want to just leave?
*rand diceroll 1 2
*if diceroll > 1
Youre lost
*goto caves
*else
*goto_scene homeode here
Think about it if you were a computer. After every *choice, you need instructions on where to go next.
So, you look at that first choice. I roll the dice, I get 6. There’s a gate that checks if I’m above 3 – I am, great! Looks like I’ll go to caves next.
But wait, what if I roll 2? There’s somewhere for me to go if I’m above 3, but nowhere if I don’t fulfill those requirements. So where do I go next? I need direct, explicit instructions.
So, as the writer, you should write
*else
*goto lost
to tell the computer where to go.
Bonus:
Implicit Control Flow is a switch that says to the computer, “You don’t need explicit instructions. Just assume you’re going to the end of the choice block unless it says otherwise.”