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
@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.
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
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):
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.
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?
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?
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
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).
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 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.)