I need help in coding

Thank a lot for the help there is also one thing that keeps bugging me “choicescript_stats line 21: invalid indent, expected at least one row” this always shows up

I need to see your code to help. Paste it in and then highlight it, and click this button (see image.) The button looks like this: </>

Your text will look like this.
  with indents.
and without.

*label stat

*choice

  #Character_Info
    *stat_chart
    text Name
    text Surname
    text Gender
    text Class
    text Wealth
    *goto stat
  #Status
  
    *stat_chart
    
    percent Health
    percent Strength
    percent Leadership
    percent Inteligence
    percent Charisma
    percent Magic
    percent Stealth
    opposed_pair Strong
      Weak
    opposed_pair Mercyful
      Brutal
    *goto stat
  *selectable_if (Relationship="true") #Relationship
  
    *stat_chart
    
    percent Shaun
    percent Jackson
    percent Isaac
    percent Kreed
    percent Kelly
    percent Amber
    *goto stat`indent preformatted text by 4 spaces`
*label stat

*choice

  #Character_Info
    *stat_chart
    text Name
    text Surname
    text Gender
    text Class
    text Wealth
    *goto stat
  #Status
  
    *stat_chart
    
    percent Health
    percent Strength
    percent Leadership
    percent Inteligence
    percent Charisma
    percent Magic
    percent Stealth
    opposed_pair Strong
      Weak
    opposed_pair Mercyful
      Brutal
    *goto stat
  *selectable_if (Relationship="true") #Relationship
  
    *stat_chart
    
    percent Shaun
    percent Jackson
    percent Isaac
    percent Kreed
    percent Kelly
    percent Amber
    *goto stat

Sorry sent it twice by mistake

Honestly I don’t see anything wrong

Try indenting the values under the *stat_chart command.

*label stat

*choice

  #Character_Info
    *stat_chart
    text Name
    text Surname
    text Gender
    text Class
    text Wealth
    *goto stat
  #Status
  
    *stat_chart
    
      percent Health
      percent Strength
      percent Leadership
      percent Inteligence
      percent Charisma
      percent Magic
      percent Stealth
      opposed_pair Strong
        Weak
      opposed_pair Mercyful
        Brutal
    *goto stat
  *selectable_if (Relationship="true") #Relationship
  
    *stat_chart

Oh and delete the blank line underneath *stat_chart I don’t think you need it. And make sure you get the first *stat_chart too.

Okay I’m done with my baseline already thanks to your help . . . do you know how to put an inventory in the story? because mine is action based and has many fight scenes that needs the items

Is there a possibility that the quick test is wrong?

Nope. It’s always technically correct. The line number it calls out for the error might not be the line actually causing the error though. It might be a bit before or after that line, or connected to some variable that didn’t get declared properly somewhere before a part of code.

1 Like

This is a good thread on inventory stuff:

Is it ok if I tag everyone that helped me in my work?

1 Like

Sorry been so long since i came back to choice script i need help once more.

*label Naming

Let us begin.

We’ll start with your name?
*choice
#Adam
*set name “Adam”
*goto last_name
#Peter
*set name “Peter”
*goto last_name
#Leona
*set name “Leona”
*goto last_name
#April
*set name “April”
*goto last_name
#What the!? those are not my names.
Oh! Please fogive me.
*label input_name
Then what is your name?
*input_text name

*if ("${name}" != "$!{name}")

  Your name is $!{name}, is that right?
  *choice
    #Yes.
      *set name "$!{name}"
      *goto last_name
    #Uhhh, wait, let me try that again.
      *goto input_name

whenever i run it it does not go to the “Your name is $!{name}, is that right?” it skips that part and goes directly to creation of last name how can i fix that?

Because the variable contains string that has its first letter capitalized?
If you put, let’s say… “Bob” for example, it won’t go through there. However, using “bob” will lead you through that code you mentioned.

You see, in case of name “bob”…

"${name}" = "bob"
"$!{name}" = "Bob"
and "$!!{name}" = "BOB"

Try replacing *if ("${name}" != "$!{name}")

with *if name != "$!{name}"

1 Like

Thanks a lot @Szaal it helped me fix my code i hope i can count on you and the others for help in the future

What do you use to separate a story into two parts do you use break or something?

Yup. Just slip the *page_break command between the parts you want to separate.
This will create a “Next” button in the actual game.

RANDOMTEST FAILED: Error: line 107: Not a number: blah blah what does that mean?