Has anyone come across invalid choice group name? (Resolved)


#1

Hi there, I’m having trouble coding in choices. I’m still new on the coding front and am already useing the coding manual(s) someone sent me but in them I can’t find anything about an invalid choice group name…
Some input would be great as I am not sure if I’m doing the *choice thing right thanks.


#2

What is the error you’re getting exactly?


#3

Startup line 2: invalid choice group name: #choice of really # anything I type right after


#4

It might help if you could post the code.


#5

How do I do that just type it here?


#6

Use
< pre>
Copy and paste you code
< /pre>

So use the pre tags but without the spaces. We can then see what you are doing and help a bit better. :wink:


#7
"hallo world"
*choice     #choice 1
Hiya

Or when I try this 
"hallo world"
*choice                                                                                                                                                           #choice 1
Hiya

#8
"hallo world" 
*choice 
 #choice 1 
   Hiya 
    *comment must have a *finish, *goto, *goto_scene, gosub, or *gosub_scene
    *goto step2

*label step 2
Next code

Edit
You can also do it as a fake choice

"hallo world" 
*fake_choice 
 #choice 1 
   Hiya
  
*label step 2
Next code

#9

How do I get the #choice 1 under *choice without pressing enter? Or did I read the manual wrong again?


#10

Yes you hit enter then space or tab once as you need to indent


#11

Oh! That what I was doing wrong then! Thank you, thank you, thank you SO MUCH!

I must have read the manual wrong as i didn’t enter thought you wasn’t surpose to… Ops :sweat_smile:


#12

Lol happy I could help, and don’t feel bad as we have all been there at some point. :smile:


#13

Changed the title to show the problem is fixed but if any other questions just ask. :wink:


#14

Running into this same problem, and I don’t really understand this answer quite well enough. Just a bit of background, I’ve been doing this for approximately 3 days, and know literally nothing about coding or anything. I’ve just kind of read/googled most things I know to get these few measly lines banged out.

Here’s the code snippet

*label RaceSelection
Alright. What kind of name is ${name}?
*choice
	#It's a very common Human name.
		Humans are exceedingly average in all aspects of life, but also possess a hunger within them that allows them to become some of the most renowned folk to ever grace the land of Comfrumpkis
		*choice Are you sure you are human?
			#No
			*goto RaceSelection
			#Yes
			*set race "Human"
			Very well
			*finish

When I choose Human, no choices come up, although the text does, and after making the choice I get “creation line 10: invalid choice group name: human?”

Sooo. What’s going on, exactly? What is the ‘choice group name’ and how can I make sure it’s valid in future selections? Like… When the game/code checks for a ‘choice group name’ what exactly is it checking for?


#15

This code snippet works, but doesn’t let me give the player the option to back out of the choice before it’s set in stone. So if there’s an easier way to do that, that would also work.

here’s the working code snippet


*label RaceSelection
Alright. What kind of name is ${name}?
*choice
	#It's a very common Human name.
		*set race "Human"
		Very well
		*finish

#16

Try moving the second *choice to the line below “Are you sure you are human?” instead of putting it on the same line. Keep the same indentation, just move it one line down. Like so:

*choice
  #It's a very common Human name.
    Humans are exceedingly average in all...

    Are you sure you are a human?
    *choice
      #No.
        *goto RaceSelection
      #Yes.
        *set race "Human"
        Very well.
        *finish

Also, double-check to make sure your *goto RaceSelection and *set race "Human" code segments are indented another level beyond the #Yes and #No choice options.


#17

@Minnow Good GOD. Why did I put *choice before “Are you sure you’re human?”?!
Thank you, very much. Also, I feel exceedingly stupid now.


#18

Don’t. Asking questions is how we learn. :slight_smile: