Coding in name

Ok so i looked at the help guides for this but i am still stuck i keep getting error messages or messages that say i have to many spaces or indents and then i cant get to the next part of the story so i really have no idea what im doing wrong here i deleted it all and just put input_text name at this point

What is your name?
*choice
   #Bob.
       *set name "Bob"
   #Dylan.
       *set name "Dylan"
   #Choose something else.
       *input_text name

Indents should have 4 spaces in them each time you indent, and look roughly like what I put above. You need to make sure you have a variable for “name” in your startup.txt file and that each of your choices *goto a label if you have errors about falling out of the choice.

Based on your last question, if someone inputted their text name “Sarah,” you would have something like:

*if (name = "Sarah")
   Text talking about Sarah.

However, that is a lot of work to do for input_text because of how many different variations people could input, so you’d be better off having special reactions to the actual name choices you provide rather than relying on input_text.

1 Like

Yeah im planning for reactions with the given names do i need to put goto something anywhere? and if that how it should be spaced? sorry for the questions

Something i keep getting are tabs and spaces appear on the same line

That means your indentation isn’t consistent. You can only use tabs or spaces, not both.

These links should provide you with a bit more information on correctly using Choicescript.

1 Like