Tabs and Spaces Error

does this help?

Yea, How do I add that a selection makes the species change?

Basically I am trying to get the selection between two different types of elves, and depending on which on is selected decides the MC’s species type in the stats screen. But I don’t know how to make that happen.

though that example, how do I fix this to do as I need while keeping the other selection behind each of the first ones?

*choice
 #The Helios: The Sun Chariot- Blessed by the Sun God Helios, these elves use the power of Helio's fire the strongest of the fire magyks called Phoebus Apollo.
     The humans glared at the elf and rushed toward him, shouting as the flaming cuffs tightened around his wrists. He smiled at them, even as they raised their swords.
     *choice
       #Hold out arms to the sky
          The sun rose high into the sky and the flaming cuffs burst out like a spiraling whip to catch the humans as they moved toward him. He made sure his baby was out of harms way, watching as a human rode off with him. He stumbled to try to cacth up, but he was caught in the back by a blade. Akashal stared blankly at the burning human who smiled at him sinisterly, before he vanished, alongside any life left in the elf that then dropped to the ground, dead.        
*choice
  #The Nanna: The Sīn Blessed- Blessed by the Moon God Sīn, these elves are intuned with the natural ebb and flow of the strongest and deadliest form of lunar magyks, known as Suen Crescent. Frequently depicted as pale of hair and flesh, they draw on the power of Sīn himself.
      The humans stared at him with scorn, one of them reaching for his sword. Akashal's eyes caught this and he acted quickly. He could feel the raw power of the moon as it slowly rose in the distance.

As for the species:

*choice
   #Helios
      *set species "species"
      flavortext
      *goto x
   #Nanna
      *set species "species2"
      *text
      *goto x

I don’t really know what you want to do with the ‘hold out arms’ bit, so I can’t give advice there.

As for the stats

You:

$!{name} a $!{species}

You go and create one or more variables to use for the species

*create species "???"

and set the species in the choice.
$!{var-name} will have a variable show with the first letter capitalized, ${x} will have it all lower case, $!!{} is all capitals.

does that help?

thats the option after selecting helios as the species, selecting nanna as a species has a different option that you can see in my other code from before. I wanna be able to have once either of those species is selected, the second choice comes up which leads to a different scene.

what does x represent?

x is simply the variable name here.

as for the ‘hold up arms’ will there be more options? and where does the story go after that? (label wise?)

This is the first part of a two part prologue, selecting helios as a race gives the MC’s ancestor the power to use the flaming cuffs around his arms by invoking the power of Helios. the nanna option gives the ancestor the ability to use the power of the moon. However after selecting helios I try to go to the next scene but it shows an error for the Nanna option about needing a goto and I don’t know how to fix that when that option should not be relevant after selecting helios.

it ends after the second choice is made then is supposed to head into the next chapter.

So, just so I get this right, it’ll be like this:

*choice
   #helios
      *set species "X"
      flavor text
      *choice
         #option
            text
            *finish (next chapter)
   #nanna
      *set species "Y"
      flavor text
      *choice
         #option
            text
            *finish (next chapter)

like that? because if at the nested choices there are no other options than the ‘raise arms’ on, you can have that as a pagebreak:

*choice
   #helios
      *set species "X"
      flavor text
      *page_break Hold Out Arms
      text
      *finish (next chapter)
   #nanna
      *set species "X"
      flavor text
      *page_break Text
      text
      *finish (next chapter)

I put finish after the arms text, but it gave me an error for the nanna choice so I had to remove it. I ended up getting rid of both choices and fusing them with the species selection, but I am still getting this error: It is iilegal to fall out of a choice statement, you must goto or finish before the end of the indented block. and I do have finish at the end of the former choice behind nanna.

choices need a goto, fake_choice will continue to the text below the choice or a goto

*fake_choice
   #option with goto
      text a
      *goto x
   #option without goto
      text b
text b continues here and goes on to label x
(unless you put a *goto y here)

*label x
text a continues here

But I think that’s not the best solution here.

What exactly do you want to do here and where do you want the text go to after the species choices (as in, what’s under the options and where does it go then)

If you use *choice then you must tell ChoiceScript where to go next.

For example

*choice 
  #option 1
    Text text text
    *goto next_part
  #option 2
    Wow, more text
    *goto next_part

*label next_part
LA di dah di da

Here the *goto command is telling the ChoiceScript to go to next_part after selecting one of the options and the *label command is telling Choicescript what is next_part.

If your code looks like this

*choice 
  #option 1
    Text text text
  #option 2
    Wow, more text

*label next_part
LA di dah di da

Then you will get a error because choicescript doesn’t know what to do after you have chosen an option.

Does choicescript needs to finish?
Does choicescript needs to go to another part?
If yes, then what other part does choicescript needs to go to?

These are the questions that choicescript has when you don’t put a command telling it what to do.

That is why you must tell ChoiceScript what to do by putting commands like *goto *finish *ending at the end of the text. (there are more commands)

If you use fake_choice then you don’t need to tell ChoiceScript what to do. So it doesn’t give you an error.

So this code would work perfectly even though it doesn’t have *goto or *finish command.

*fake_choice 
  #option 1
    Text text text
  #option 2
    Wow, more text

LA di dah di da

Here, choicescript will skip to the text “LA di dah da” below all the options.

Note: there is a *create implicit_control_flow true which would solve this but it can lead to unintended effects so don’t use it for the time being.

Another note: Choice | ChoiceScript Wiki | Fandom this wiki has all the answers to all the initial problems you would face in coding.

Also paste the sample Choice of Dragons code in CSIDE and see how it works, tinker with it. It helped me a lot.

I closed my computer for a while and it was on, I go back and CSIDE has error exclamation marks next to my scenes. says there’s an error that can’t be displayed or something like that, I click on the sections and they all vanish along with my project window…I don’t know what to do and I managed to get a few things to work and I didn’t save it anywhere else…TwT

so is it all gone or is the project still there? any txt files still from when you where working in notepad?

I mainly fixed it in CSIDE and didn’t paste it into notepad because it wasn’t working there… its all gone I think, all the areas aren’t there anymore

:frowning: that sucks massively.

maybe there’s a way to recover it

Yeah that happened to me too when I used CSIDE. Your files should be in your Dropbox account. Mine were.
However, they may be gone if you didn’t save at all.

I would recommend you to save your .txt files offline and on multiple devices and cloud saves.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.