Error in Code (Need Help)


#1

So yeah, I somehow encountered an error in my code and need help.

CODE:

*choice
INDENT #Male
2 INDENTS You see a man who has seen the horrors of war, lost family and someone who knows what it feels like to lose someone. You see someone who knows how to survive in a world that will chew you up and
spit it out.
*set gender “Male”
*goto ID
INDENT #Female
2 INDENTS You see a woman who has seen the horrors of war, lost family and someone who knows what it feels like to lose someone. You see someone who knows how to survive in a world that will chew you up and
spit it out.
*set gender “Female”
*goto ID


#2

Hi, just moved your topic in the “ChoiceScript Help” category.

What is the error you get?


#3

The #female choice doesn’t get recognized.


#4

Basically, your code looks like this, right?

*choice
    #Male
        You see a man who has seen the horrors of war, lost family and someone who knows what it feels like to lose someone. You see someone who knows how to survive in a world that will chew you up and spit it out.
        *set gender "Male"
        *goto ID
    #Female
        You see a woman who has seen the horrors of war, lost family and someone who knows what it feels like to lose someone. You see someone who knows how to survive in a world that will chew you up and spit it out.
        *set gender "Female"
        *goto ID

But I have no idea why #Female shouldn’t be available if it looks as above…


#5

Indeed, just tested it, and it works.


#6

Make sure you manually space - using the indent key will screw up the code.


#7

Yeah, I just tried your code and it worked. It was an indentation mistake. :slight_smile:


#8

Ah ^^ Glad I could be of help, then.


#9

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.


#10

Or just wrap your text in the pre tag like this:

<pre>Code here</pre>