Noob questions abound; open quote error

A few years back I took an introductory computer science course and we went through html and java; the aspects of coding are at least somewhat familiar to me but it has been a while and ChoiceScript certainly is no html…

I wrote my first choice and wanted to see if I’m doing this properly and of course–just like I remember from CSCI 101–bugs and error codes that leave me puzzled and frustrated.

My title and name appear, with the error:
line 12: Invalid string, open quote with no close quote: "unknown

I got rid of line 12 entirely and it says the same exact error. so then i finished off my little snippet with:
*label todo
This isn’t done yet
*page_break
*ending

as mentioned in the wiki, and still. same error code. I checked the forums but haven’t found any answers to this specific error. I haven’t even gotten to the complicated parts of coding, but this is too promising and exciting to give up.

Thanks for any help

Is it in one of your startup variables? Kind of hard to diagnose without the original code in its entirety.

Hadn’t thought of that. Here’s my startup.txt document in entirety:

*title First Choice: Demo

*author Nicolette Sauveterre

*scene_list
startup
pro
one
two

*create name “unknown”
*create gender "unknown
*create gold 0
*create satisfaction 50
*create clever 50
*create eloquence 50
*create leadership 50
*create strength 50
*create health 100
*create leo 50
*create gabriel 50
*create chiara 50
*create elise 50

Oh duh–I thought the “unknown” was it saying it wasn’t sure what was causing the error, but that was the quote it’s referencing. I am an idiot.

So yes, you were right–it was a startup variable.

2 Likes

So I fixed that error, and the next error, and now it’s saying:
line 8: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.

but i have a goto after each option, like so,
She raises her eyes at him, then glances to you and crosses her arms. “What’d you do to get caught up in his mess?”

*choice
#Tell her you and Leo are good friends, you’d do anything for him. This favor is well worth the danger.
– --“Danger?” She asks. “What danger?”
– --*goto explain_whats_going_on
#Explain that Elise is a dear friend and a good soul, and you won’t let her be punished for something she isn’t at fault for.
– --“Little Elise…has something happened?”
– --*goto explain_whats_going_on
#You may not see eye-to-eye with Leo’s strict adherence to the rules but he’s in need of aid, and you’re not one to let anyone down.
– --*set leadership +10%
– --“Leo, in need of aid? That’ll be the day.” She snickers, rolling her eyes, but the quiet tension of the room draws her attention back. Quietly she says, “You’re…serious?”
– --*goto explain_whats_going_on
#Ensure her there’s no mess at all–you have everything under control.
– --“And yet the two of you barge in here on my only day off with wild looks on your faces. You can’t lie to me, there’s a mess and you need my help getting it cleaned up.”
– --*goto explain_whats_going_on

*label explain_whats_going_on
Chiara shakes her head and takes a steadying breath. “Explain what’s going on, please.”
*page_break
*ending

so why are my goto’s wrong? If I can get this first segment under way I can at least mimic it in the future

The way nice found is to use *fake_choice instead of *choice. That should fix it. The second way is you’ll need to add another *goto immediately after all the choices, at least I think.

Hm. neither *fake_choice nor an extra *goto fixed it.
Could it be my indentation is off?
*choice is against the margin with the #options indented once, the replies twice, and the *goto’s twice

I think it was partly the *fake_choice and partly indentation issues; it seems to be in working order now.

thanks for the help @CitizenShawn :]

1 Like

How to format your code so it can be seen on the forum.

Paste code into window.
Highlight all of the code.
Click the preformatted text button. (It looks like </> and is next to the quote one and on the same bar as the other formatting and smilies choice.)
Click reply.

5 Likes

Wonderful, thanks for the tip!