Invalid choice group name: \


#1

The error I’m getting is

"Intro line 11: invalid choice group name: "

I’ve messed with it for over an hour but the same thing keeps coming up when I test it.
I do plan on adding more to this scene but since I can’t even get this one choice to work I chose to just use *finish at the end of each choice (which I’m not 100% sure is even allowed).
Also, I’m not sure if it’s relevant but my mygame.js file looks like this

nav = new SceneNavigator([
	"Startup"
	,"intro"
]);
stats = {};

and my startup.txt file looks like this

*title Title

*author My name

*scene_list
  startup
  Intro

and my choicescript_stats.txt file is completely empty.

The code I’m having trouble with looks like this:

You feel the wind pick up and shudder as you pull your…
*choice
	#shawl more tightly around your shoulders.
        In addition to your wool shawl you are wearing an ankle-length brown dress with wooden buttons and a cream lace collar over a white linen shift. Your boots are dark brown leather and fairly worn but still sturdy.
		*ending
 	#cloak over your head.
        In addition to your wool cloak you are wearing a plain, wine colored doublet over a white linen shirt. Your pants and boots are both dark brown and fairly worn but still sturdy.
		*ending

#2

Try using a *goto or *goto_scene instead of ending and see if that helps.
What line is the exact text at line eleven in the intro file?


#3

@jacic Even when I add *goto it still says "Intro line 11: invalid choice group name: "

This is a silly question but how do I tell which line is eleven? Because depending on how stretched out I have the screen the lines change. :sweat_smile:

You feel the wind pick up and shudder as you pull your…
*choice
	#shawl more tightly around your shoulders.
		In addition to your wool shawl you are wearing an ankle-length brown dress with wooden buttons 		and a 	cream lace collar over a white linen shift. Your boots are dark brown leather and fairly worn 		but still sturdy.
		*goto clothing1
 	#cloak over your head.
		In addition to your wool cloak you are wearing a plain, wine colored doublet over a white linen 			shirt. Your pants and boots are both dark brown and fairly worn but still sturdy
		*goto clothing2
*label clothing1
In addition to your wool shawl you are wearing an ankle-length brown dress with wooden buttons and a cream lace collar over a white linen shift. Your boots are dark brown leather and fairly worn but still sturdy.
	*finish
*label clothing2
In addition to your wool cloak you are wearing a plain, wine colored doublet over a white linen shirt. Your pants and boots are both dark brown and fairly worn but still sturdy.
	*finish

#4

it says 11th line of intro scene - try checking that


#5

What program are you using to code? If you’re using a word processor, it may be causing problems with characters and spacing. Text editors will also display the line number on the side of the screen. A new line begins whenever there is a paragraph break (so when return/enter is pressed).

I copy-pasted your text into a text editor, and I saw quite a lot of stray characters and inconsistent spacing, like so (the grey dotted marks):

Try retyping the text into a text editor and see how it goes? It’ll also be easier to troubleshoot with visible line numbers.


#6

If you use an editor like Notepad++, each “line” will be numbered for you. Chronicler and other aids will do the same. A new “line” usually is created with a hard return.

Edit - @Fiogan :ninjad me - once again. :astonished: :bikini:


#7

I’m currently using textedit because that was the default and the lines aren’t numbered. I can’t use Notepad ++ because I’m on a mac, is there similar program?


#8

I’m currently using textedit, what did you use?


#9

I use a Mac as well. You can set TextEdit to ‘plain text’ instead of ‘rich text’ and make sure it’s saving as a UTF-8 .txt file in the preferences, but there isn’t an easy way to show the line numbers. If it’s saving as .rtf, that might be one reason your code isn’t working for you currently.

As for a Mac text editor, I would recommend TextMate, which is a free download. I use it for some of my bookkeeping work; I prefer to avoid TextEdit. It’s very possible that some of the more code-savvy users here might be able to recommend something better.

For ChoiceScript, I currently use @CJW’s CSIDE (which is what that screenshot was from). Unfortunately, the public version isn’t out quite yet. It looks like the public release will be soon, though, which is exciting! Meanwhile, maybe try TextMate?


#10

Yay! It’s working now, textmate solved whatever problem was occuring!
One more question though do you by any chance know why only one of my choices is showing up? This is what my text looks like now,

You feel the wind pick up and shudder as you pull your...
*choice
 #shawl more tightly around your shoulders.
  In addition to your wool shawl you are wearing an ankle-length brown dress with wooden buttons and a cream lace collar over a white linen shift. Your boots are dark brown leather and fairly worn but still sturdy.
*goto clothing1
 #cloak over your head.
  In addition to your wool cloak you are wearing a plain, wine colored doublet over a white linen shirt. Your  pants and boots are both dark brown and fairly worn but still sturdy.
*goto clothing2

*label clothing1
In addition to your wool shawl you are wearing an ankle-length brown dress with wooden buttons and a cream lace collar over a white linen shift. Your boots are dark brown leather and fairly worn but still sturdy.
*finish
*label clothing2
In addition to your wool cloak you are wearing a plain, wine colored doublet over a white linen shirt. Your pants and boots are both dark brown and fairly worn but still sturdy.
*finish

#11

Yay!

The second option isn’t showing up because the *goto needs to be in line with the rest of the option’s subsequent text, like so:


You feel the wind pick up and shudder as you pull your...
*choice
 #shawl more tightly around your shoulders.
  In addition to your wool shawl you are wearing an ankle-length brown dress with wooden buttons and a cream lace collar over a white linen shift. Your boots are dark brown leather and fairly worn but still sturdy.
  *goto clothing1
 #cloak over your head.
  In addition to your wool cloak you are wearing a plain, wine colored doublet over a white linen shirt. Your  pants and boots are both dark brown and fairly worn but still sturdy.
  *goto clothing2

Also, I think using at least two spaces as an indentation block (instead of one) is recommended; that way, it’s less likely to get confused through a text error, and it’s easier to read if there are a lot of levels of indentation. Some people even use four spaces—just, make sure if you do change to two or four spaces that you’re consistent throughout, and each new indentation level is a multiple of two (or four).


#12

Thank you so much for your help! I would never have been able to figure that out on my own haha :grin:

@Jacic @DUNGEON_MASTER @Eiwynn
Thank you for your help too!


#13

I use tabs instead of spaces. Nice big changes in indentation and I don’t have to worry if I’ve added or lost a space in there because it’s usually really obvious if I’ve pressed tab twice by mistake :slight_smile: if you’re having trouble with uneven spacing try that. (You’ll need to change everything from spaces to tabs though, mixing them in a file can cause problems.)