"No selectable option" error message


#1
*choice
  *if (points > 10)
    #Strength
      *set strength +10
      *set points -10
      *goto addpoints
  *if (points > 10)
    #Speed
      *set speed +10
      *set points -10
      *goto addpoints
  *if (points > 10)
    #Intelligence
      *set intelligence +10
      *set points -10
      *goto addpoints
  *if (points > 10)
    #Taijutsu
      *set taijutsu +10
      *set points -10
      *goto addpoints
  *if (points > 10)
    #Ninjutsu
      *set ninjutsu +10
      *set points -10
      *goto addpoints
  *if (points > 10)
    #Genjutsu
      *set Genjutsu +10
      *set points -10
      *goto addpoints
  *if (points < 10)
    #Finished.
      *goto wayoftheninja

For some reason, when I test the game out myself, it has an error. It says “No selectable option”. and then line#. For the line #, it tells me the problem is at the same line the *choice is at. I’m HELLA confused.


#2

If I’m reading your code correctly and assume that you’ve properly indented your code, it’s because you placed the *if code at a different line than your options. Try this.

*if (points > 10) #Strength

And so on and so forth for your options. Also, I suggest changing the if function to *if (points > 0) so that you have the full point allocation since *if points > 10 will ignore the points option when it drops to precisely 10.


#3

So is it like this

*if (points > 10)#Strength
      *set strength +10
      *set points -10
      *goto addpoints 
Or this 

*if (points > 10)#Strength
                          *set strength +10
                          *set points -10
                          *goto addpoints

#4

It messed up. Sorry

For the second one, the *set were supposed to be under the strength instead of the *if


#5

Put a space between the close parenthesis and the # and you can use either one indentation although the first one is easier to look at. And now that i can see the choices properly, set the final option to be *if (points =0)


#6

What if points=10?

No options. :smile:


#7

Okay. But the problem is still there. Let me go into detail a bit more

Once I reach the 10 point mark after distriputing most of it, thats when the “no selectable option” pops up


#8

Can we see the modified code now?


#9

*if (points > 10) #Strength
*set strength +10
*set points -10
*goto addpoints
*if (points > 10) #Speed
*set speed +10
*set points -10
*goto addpoints
*if (points > 10) #Intelligence
*set intelligence +10
*set points -10
*goto addpoints
*if (points > 10) #Taijutsu
*set taijutsu +10
*set points -10
*goto addpoints
*if (points > 10) #Ninjutsu
*set ninjutsu +10
*set points -10
*goto addpoints
*if (points > 10) #Genjutsu
*set Genjutsu +10
*set points -10
*goto addpoints
*if (points =0) #Finished.
*goto wayoftheninja


#10

Use *if (points > 0) and for the final one, try *if (points = 0) with the space.


#11

Alright thanks. Gonna try it again.

btw, is there a faster way to test all your choices instead of doing it manually?


#12

Sure. Use quicktest and randomtest. They’re in the choice game folder that you downloaded to make the game.


#13

How? I have no idea how to use it. Not a rookie at choicescript or anything though


#14

Just select the file that says randomtest (the one that says randomtest and has a picture of the browser you use to index the game files) double click it.


#15

Just double click on the quicktest.html or randomtest.html file.


#16

Whats the difference


#17

Quicktest runs through the whole thing once like making sure each option is fine. Randomtest runs multiple runs, choosing different seeds to test your story from different angles. At least that’s how I see it.


#18

What the hell are the illiteration and seed things


#19

Iterations is how many times you want randomtest to run your game. Seed is how randomtest will make its selections when running the tests.


#20

Damn, it wont start!