# Help with Code

**URL:** <https://forum.choiceofgames.com/t/help-with-code/46855>\
**Category:** ChoiceScript Help\
**Created:** [December 1, 2018, 3:24am UTC](https://forum.choiceofgames.com/t/help-with-code/46855 "2018-12-01T03:24:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hylaire\_Dessalines1](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hylaire_dessalines1/32/258106_2.png) [@Hylaire\_Dessalines1](https://forum.choiceofgames.com/u/Hylaire_Dessalines1)\
**Post date:** [December 1, 2018, 3:24am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/1 "2018-12-01T03:24:48Z")

</div>

I’m having trouble with the startup.

The error I’m getting is I’m having trouble with the startup and every time I try to play, I get an error.

\*commend  
Indent

```
*author H.D
*scene_list
  startup
  Prologue: Kotodama
  Chapter 1:Tenkosei
  Chapter 2: Akai Tsuki
  Chapter 3: Burkkurao
  Chapter 4: Yukue Fumei
  Chapter 5: Kyoko
  Chapter 6: Yurei
  Chapter 7: Ashioto
  Chapter 8: Dare ga Watashi
  Chapter 9: Beneath
  Chapter 10: Himitsu No Nikki 
   Chapter 11: Shinjtsu
  Chapter 12: Class Photo:1978
  Chapter 13: Weakness
  Chapter 14: True Strength
  Chapter 15: Closure
  Chapter 16: The Old House
  Chapter 17: Forgiveness
  Chapter 18: Peace
  Chapter 19: Until We Meet Again
  Epilouge: Mirai
*create Courage 0
*create Academics 0
*create Expression 0
*create Understanding 0
*create Sanity 0
*goto_scene Prologue: Kotodama
*goto_scene Chapter 1: Tenkosei
*goto_scene Chapter 2: Akai Tsuki
*goto_scene Chapter 3: Burkkurao
*goto_scene Chapter 4: Yukue Fumei
*goto_scene Chapter 5: Kyoko
*goto_scene Chapter 6: Yurei
*goto_scene Chapter 7: Ashioto
*goto_scene Chapter 8: Dare ga Watashi
*goto_scene Chapter 9: Beneath
*goto_scene Chapter 10: Himitsu No Nikki
*goto_scene Chapter 11: Shinjtsu
*goto_scene Chapter 12: Class Photo:1978
*goto_scene Chapter 13: Weakness
*goto_scene Chapter 14: True Strength
*goto_scene Chapter 15: Closure
*goto_scene Chapter 16: The Old House
*goto_scene Chapter 17: Forgiveness
*goto_scene Chapter 18: Peace
*goto_scene Chapter 19: Until We Meet Again
*goto_scene Epilogue: Mirai
```

---

<div class="post-metadata">

**Author:** ![Cheion](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cheion/32/68558_2.png) [@Cheion](https://forum.choiceofgames.com/u/Cheion)\
**Post date:** [December 1, 2018, 3:51am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/2 "2018-12-01T03:51:47Z")

</div>

What’s the error you’re getting? if it’s _" Our apologies; there was a 404 error while loading game data. Please refresh your browser now; if that doesn’t work, please email [support-external@choiceofgames.com](mailto:support-external@choiceofgames.com) with details."_ (the one you mentioned before your edits), it means the file wasn’t uploaded. The game’s trying to go to the next page, but there isn’t a next page.

Try reuploading the startup file again?

* * *

And… I don’ think you can have so many `*goto_scene` in this format; otherwise the game won’t know which scene to load next.

Just arranging the order you want the scenes to appear under the `*scene_list` indent will be enough.

---

<div class="post-metadata">

**Author:** ![sviyagin](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/sviyagin/32/50885_2.png) [@sviyagin](https://forum.choiceofgames.com/u/sviyagin)\
**Post date:** [December 1, 2018, 3:52am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/3 "2018-12-01T03:52:21Z")

</div>

The first thing I see is an indentation error on Chapter 11. but you don’t need all those goto\_scenes. As soon as your code hits one, it won’t see anything else. The startup file is actually your chapter one, where all your chapter one stuff goes

---

<div class="post-metadata">

**Author:** ![Minnow](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Minnow](https://forum.choiceofgames.com/u/Minnow)\
**Post date:** [December 1, 2018, 4:00am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/4 "2018-12-01T04:00:34Z")

</div>

In addition to what the others have said, I’m fairly certain ChoiceScript is unhappy with spaces and punctuation characters in chapter filenames. So while `prologue_kotodama` is unlikely to cause any problems, you may see issues with either `prologue kotodama` or `prologue:_kotodama`.

Try renaming your `.txt` files and adjusting your `*goto_scene` commands to match the new filenames. Then give it a test and see if anything changes.

---

<div class="post-metadata">

**Author:** ![sviyagin](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/sviyagin/32/50885_2.png) [@sviyagin](https://forum.choiceofgames.com/u/sviyagin)\
**Post date:** [December 1, 2018, 4:03am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/5 "2018-12-01T04:03:02Z")

</div>

your startup doesn’t actually have to contain story now that I think about it, but instead of all your goto\_scenes at the end of the file, you should have a \*finish. The \*finish command will immediately take the player to the next scene (so the prologue)

Re what @minnow said, I tested it out to see if it would work with spaces, and I didn’t have any trouble, but I would still be kind of wary about it and change it anyway

---

<div class="post-metadata">

**Author:** ![GoldenSilver](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/goldensilver/32/110153_2.png) [@GoldenSilver](https://forum.choiceofgames.com/u/GoldenSilver)\
**Post date:** [December 1, 2018, 4:42am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/6 "2018-12-01T04:42:49Z")

</div>

In your \*scene\_list you need to include the .txt filenames. Suppose you have a file called prologue\_kotodama.txt in the scenes folder, you would have it simply as “prologue\_kotodama” in the \*scene\_list.

Use \*finish to go to the next scene in the order that is listed in the \*scene\_list. If you use \*finish while on startup, it will go to the scene that is below.

To correct all of this, we will remove first correct the \*scene\_list with proper filenames (you need to follow name conventions, such as no spacing and special characters).

```
*author H.D
*scene_list
  startup
  prologue_kotodama
  chapter_1_tenkosei
  .
  .
  .

```

When you create your .txt files for the next chapters, make sure to follow the name that is in \*scene\_list.

Next you must remove all your \*goto\_scenes and simply add a \*finish. (Also, should you wish to use \*goto\_scene at any time you will need to point to the filename, such as \*goto\_scene prologue\_kotodama).

```
.
.
.
*create Courage 0
*create Academics 0
*create Expression 0
*create Understanding 0
*create Sanity 0

*finish

```

This will make the game go to the next file in the \*scene\_list; since we are in “startup” right now, that would be “prologue\_kotodama”.

Use \*goto\_scene only if you want to go to a specific scene that is in a different order from your \*scene\_list; otherwise just use \*finish instead.

* * *

I recommend you take a look on the following tutorials so you can have a good outlook on how to start making your game:

> **[A Basic Tutorial](https://choicescriptdev.fandom.com/wiki/A_Basic_Tutorial)**
>
> Welcome to A Basic Tutorial, and indeed, to the wonderful (if sometimes wacky!) world of ChoiceScript Game Development. There are a number of basics concepts that are necessary to understand in learning, using and discussing ChoiceScript, and this...

> **[Scenes](https://choicescriptdev.fandom.com/wiki/Scenes)**
>
> A scene is the basic file of ChoiceScript, containing your story narrative as well as the scripting (simple programming, in essence, also often referred to as "the code") necessary to turn it into a ChoiceScript game. Scene files are located in the...

---

<div class="post-metadata">

**Author:** ![will](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/will/32/132033_2.png) [@will](https://forum.choiceofgames.com/u/will)\
**Post date:** [December 1, 2018, 5:16am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/7 "2018-12-01T05:16:57Z")

</div>

I think this is a matter of reading the tutorial and following along rather than solving this particular problem. If you rely on other people to do your thinking for you, you’ll never get a hang of the system on your own.

I recommend this tutorial: [http://www.maderealstories.com/games/ChoiceScriptTutorial.html#.1g](http://www.maderealstories.com/games/ChoiceScriptTutorial.html#.1g). It’s long but it’s very easy to follow and very in-depth.

---

<div class="post-metadata">

**Author:** ![Hylaire\_Dessalines1](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hylaire_dessalines1/32/258106_2.png) [@Hylaire\_Dessalines1](https://forum.choiceofgames.com/u/Hylaire_Dessalines1)\
**Post date:** [December 3, 2018, 3:02pm UTC](https://forum.choiceofgames.com/t/help-with-code/46855/8 "2018-12-03T15:02:26Z")

</div>

So how do i do this?

---

<div class="post-metadata">

**Author:** ![Hazel](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hazel/32/77796_2.png) [@Hazel](https://forum.choiceofgames.com/u/Hazel)\
**Post date:** [December 3, 2018, 3:05pm UTC](https://forum.choiceofgames.com/t/help-with-code/46855/9 "2018-12-03T15:05:03Z")

</div>

Scene file names can’t have spaces or colons in them.

Reading the tutorial will give you an idea of how they should look.

---

<div class="post-metadata">

**Author:** ![will](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/will/32/132033_2.png) [@will](https://forum.choiceofgames.com/u/will)\
**Post date:** [December 4, 2018, 4:42am UTC](https://forum.choiceofgames.com/t/help-with-code/46855/10 "2018-12-04T04:42:10Z")

</div>

You follow everyone’s advice and read the tutorial … ? The choice script markup format doesn’t require a lot of technical skill, but it does require a certain amount of self-sufficiency.
