Hi there!! I literally started using ChoiceScript last night so I’m relatively new to all this…
I’ve created a bit of a story with no real problem, however ever since I coded a gender choice I keep getting an “Expected choice body” error which in reference to the following piece of code.
*label bubble_179353800
*choice #I am a guy. Dick and All.
*Set gender "male"
*set him "him"
*set his "his"
*set he "he"
*set guy "guy"
*set mr "mr"
*set sir "sir"
*set man "man"
*goto bubble_179432032
#I am a women. Sans Dick and all.
*Set gender "female"
*set him "her"
*set his "her"
*set he "she"
*set guy "lass"
*set mr "mrs"
*set sir "ma'm"
*set man "woman"
*goto bubble_179432032
Now, whenever I test the story… The Expected Choice Body error pops up at the same specific point.
I don’t really know what to do so I was wondering if someone could help.
Thank ye!!
Sam
That appears to be an error in me copying the code over to the forum. In Notepad++ it is already indented.
Also, may I add… of all of the people to reply to my forum post, I’m so glad it is you!
I am an absolutely massive fan of your work (especially the Lost Heir franchise), and I wish to be half the writer you are in the future!
@ThatGuySam If Notepad++ is giving you errors when you paste it over, you could always try pasting it to just a normal text document first and then pasting it here?
Let’s say you had your code like this, would this work for you?
*label bubble_179353800
How do you see yourself?
*choice
#I am a guy.
*Set gender "male"
*set him "him"
*set his "his"
*set he "he"
*set guy "guy"
*set mr "mr"
*set sir "sir"
*set man "man"
*goto bubble_179432032
#I am a woman.
*Set gender "female"
*set him "her"
*set his "her"
*set he "she"
*set guy "lass"
*set mr "mrs"
*set sir "ma'am"
*set man "woman"
*goto bubble_179432032
If you want to post code with exact spacing/ indentation, use the </> button in the ribbon along the top of the mini-window when you post. That should maintain exactly what you have… Good luck with the game!
Line 324 is messed up only because of line 320.
Line 320 has a choice, but you didn’t tell the game to do anything when the player picks that choice.
That’s why the game is telling you that it’s expecting a choice body.
Does this help?
Okay, so when you start a reply to someone or a new post, there is a window that opens/ pops up in the bottom part of your screen. On that pop up is a part that says who you are sending it to. Right below that is what I call a ribbon. It’s just a sectioned-off part of that window/ pop-up.
I’ll point to it in this screenshot: