Question about stats indentation, and stats_chart

I’m having trouble with…

The error I’m getting is:…

My code looks like this:

    IndentSo, just wondering about identation for checking stats.
When I for example have ```*set direct +10```
How exactly is that indented? From what I can tell, there has to be a space, or at least there has to be with the *create command since otherwise the game throws up an arror.
Also, with the stat_chart command. What is the exact way you put that in? I have heard about it, and would like to implament it into my game, since the PC will have a lot of stats to play around with, but not sure how to right it in correctly. if I just put the stats_chart command in, then list off the stats in Choiceofgames_stats, the game throws up an arrore when I go to the stats page.
I did read the "Basic choice script guide, about this, but still a bit confused.

Did you read this tutorial?

Check Indentation and Stats Screen

1 Like

I think you might do well with a bit more of an interactive type of tutorial to understand this better.

I’d suggest downloading the ChoiceScript IDE and using their excellent Interactive CSIDE Tutorial:

It will let you see things in action at the same time as you have real live examples.

1 Like

Treat indentation like “levels.” You indent to indicate the code belongs to a command of higher level.

*if abc = true
   *set food = "sandwich"
   *set food2 = "burger"
*elseif abc = false
   *set food = "none"

In this example, the parent command *if abc = true has two child: *set food = "sandwich" and *set food2 = burger. Otherwise, parent command *elseif abc = false only has one: *set food = none"

Commands that require child/indented code:

Be consistent with your indentation level. Use either a tab, a space, or a set of spaces, but never mix them.

Never indent *create command.


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