Getting the 'no selectable option'?

Hello I’m having a bit of trouble with the ‘No selectable option’ error.

My intention was to have the player have three different choices that they can pick in any order (I used hide_reuse for this). After choosing all three, they go to the next paragraph. I keep count with the variable ‘car’.

I also have some extra flavour text where you could go outside or inside. For example:
*Inside (Choice 1) → Go outside (Choice 2) → Stay outside (Choice 3)
*Go outside (Choice 2) → Go back in (Choice 1) → Go back out (Choice 3)]

Sorry if its a little confusing but basically my problem is that I can’t get to the third option?? Like, after choosing 2 random ones I get the error of ‘no selectable option’ after going back to label stranded and the car variable is = 2.

Here’s my simplified code:

*temp outside false
*label stranded

*if (car = 3)
    *goto continue

*choice
    *hide_reuse #Choice 1
        *if (outside = false)
            You are inside
            *set car +1
            *goto stranded
            
        *if (outside = true)
            You go inside
            *set outside false
            *set car +1
            *goto stranded
    
    *hide_reuse #Choice 2
        *if (outside = false)
            You go outside
            *set outside true
            *set car +1
            *goto stranded
            
        *if (outside = true)
            You stay outside
            *set car +1
            *goto stranded
    
    *hide_reuse #Choice 3
        *if (outside = false)
            You go outside
            *set outside true
            *set car +1
            *goto stranded
        
        *if (outside = true)
            You stay outside
            *set car +1
            *goto stranded

*label continue
Text text text
    

I hope someone can help me here and thanks in advance if you can :blush:.

That code example works well on my end. Mind posting the full code instead?

That error means the code is going to the stranded label but all of the choices have already been chosen, so there’s no choice and the game softlocks. Try this variation of your code instead.

*temp car 0

*label stranded
Where do you go?
*choice
  *hide_reuse #Choice 1.
    *set car +1
    *if outside
      You go inside.
      *goto check
    *else
      You are inside.
      *goto check
  *hide_reuse #Choice 2.
    *set car +1
    *if outside
      You stay outside.
      *goto check
    *else
      You go outside.
      *goto check
  #Choice 3.
    *set car +1
    *if outside
      You stay outside.
      *goto check
    *else
      You go outside.
      *goto check

*label check
*if car = 3
  *goto continue
*else
  *goto stranded

*label continue
Text text text

This version is essentially the same, but it uses *if/*else combos to ensure you miss no conditions and it moves the check to after the selection so that you only go back to the stranded label if car != 3. I think you were getting the error because the stranded label loaded before you checked car; since there’s no choices available when the page loads, it gives an error.

Alternatively, put the choice-block itself inside the check.

*temp outside false
*label stranded

*if (car != 3)
    *choice
        *hide_reuse #Choice 1
            *if (outside = false)
                You are inside
                *set car +1
                *goto stranded
            
            *if (outside = true)
                You go inside
                *set outside false
                *set car +1
                *goto stranded
    
        *hide_reuse #Choice 2
            *if (outside = false)
                You go outside
                *set outside true
                *set car +1
                *goto stranded
            
            *if (outside = true)
                You stay outside
                *set car +1
                *goto stranded
    
        *hide_reuse #Choice 3
            *if (outside = false)
                You go outside
                *set outside true
                *set car +1
                *goto stranded
        
            *if (outside = true)
                You stay outside
                *set car +1
                *goto stranded

*label continue
Text text text
1 Like

This one worked! Thank you very much!

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