Indenting help

So I’m a complete noob. I just downloaded this 2 hours ago and I have no idea what to do.

The error I’m getting is:line 7 of 0_prologue:invalid indent, expected at least one ‘choice’

My code looks like this:
*choice
#A beautiful Jacaranda, its purple flowers already in full bloom.
*set charisma +20
*set tree “jacaranda”

 ``*goto After

#An ancient Oak, powerful enough to endure the fiercest storms.
*set strength +20
*set tree "oak"
Is so tall that you still get a bit dizzy looking below even after all these years.
*goto After

Example
*commend
Indent

Maybe the forum messed up your quote but some languages like CS or Python require indentation for the code to work properly. For example:

*choice
#A beautiful Jacaranda...
*set charisma +20
*set tree "jacaranda"

For this to properly work you need to properly indent your code, as in add some space to represent what is a “subcommand” of something else. The *choice command has choices that use the # as its subcommands, as well as whatever happens in the choice also being a “subcommand”. All these levels require indentation.

To indent your code, use a tabulation (a press of the tab key) for each level.

*choice
	#A beautiful Jacaranda...
		*set charisma +20
		*set tree "jacaranda"
		*goto After
	#An ancient oak...
		*set strength +20
		*set tree oak
		Is so tall that you still got...
		*goto After

*label After

Note how each “level” there is a tab to denote indentation. Just to illustrate this, each 5 dashed lines will represent a tab. (-----)

*choice
-----#A beautiful Jacaranda...
----------*set charisma +20
----------*set tree "jacaranda"
----------*goto After
-----#An ancient oak...
----------*set strength +20
----------*set tree oak
----------Is so tall that you still got...
----------*goto After

*label After

Check the wiki to know when indentation is needed. Most of the *choice, *ifs etc require indentation.

5 Likes
*choice
  #option 2 indents
   *set variable 3 indents
   *goto 3 indents

You can do however many indents you want as long as it’s consistent if you don’t indent your commands your gonna get the same errors you have now

Oh. Thank you. I’m going to try this tomorrow.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.