I need help in coding


#14

@CitizenShawn Sorry I'm so new to coding I'm just learning bit by bit i haven't coded anything before thanks for the help though


#15

No need to apologize, I'm sorrry! I realized it sounded like I thought you knew what you were doing after I posted. I know you're new xD

In this particular situation, you just need to use *goto, *gosub will bring you back to that point after a *return. So here, you can get rid of the *gosubs and the *returns. :slight_smile:


#16

I used subs for a reason in my example, although you definitely don't actually need them in that instance, and I can't really remember why I used them.

I think it was because I had two occasions when you might be setting things male, two setting things female, and I liked the idea of bouncing back to where you started. But I don't make full use of actually having used subroutines instead of gotos there, so that might have also been something on my todo list to fix about the tutorial.


#17

The tutorial I made had a section for gender variables, along with detailed notes on how to get gender neutral options in there, if you want to reference that as a starting point for improving your own guide.

Gender Pronouns Template

P.S. I would actually recommend against automatically capitalizing names, in case someone wants to RP as bell hooks or someone like that.


"I don't understand it" is the new "I don't want to listen"?
#18

How do you add checkpoints to your work?


#19

What do you need checkpoints for? They're not something I tend to bother with.

There are a few ways,


#20

Since I'm lazy I might just point at your guide and leave it at that.

I agree! However I think it's a nice thing to show writers it's possible, since it was one of those little things I went ooh at. Only I couldn't find a way to work it into my tutorial.


#21

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


#22

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.


#23
*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`

#24
*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

#25

Sorry sent it twice by mistake


#26

Honestly I don't see anything wrong


#27

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

#28

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.


#29

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


#30

Is there a possibility that the quick test is wrong?


#31

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.


#32

This is a good thread on inventory stuff:


#33

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