Help with Code

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

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 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.

1 Like

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

1 Like

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.

1 Like

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

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:

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. It’s long but it’s very easy to follow and very in-depth.

So how do i do this?

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

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

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.

1 Like