[Resolved] Literally just began, no idea what's wrong

Hey, just downloaded the choicescript program, and I’m following the tutorial and all, but I’m trying to edit in Notepad, and things just aren’t turning out right. I have literally copied and pasted from the examples they offer us in the tutorial and still the thing doesn’t work.

nav = new SceneNavigator(["startup"]);
stats = {};

*title My First ChoiceScript Game
*author Anonymous
*scene_list
  startup
  animal
  variables
  gosub
  ending
  death

*create leadership 50
*create strength 50

Welcome to your very first ChoiceScript game

And all this here, taken from the official example, still results in a “Syntax error” and “Unable to get property ‘setStartingStatsClone’ of undefined or null reference”
When I’ve messed around on my own, adding choices and such, nothing changes, either. Nothing loads at all. It continually gives me errors.

Any ideas what the hell I’m doing wrong? I really want this to work out.

  1. start the document with(the below) at the top.
    *title
    *author

  2. The next section below that is for created variables that must be at the top of the startup document. so all the create functions MUST be above ALL other aspects of the story below and within the startup file.
    *create variable1
    *create variable2
    *create variable 3

  3. then comes the scene list under your *created variables
    *scene_list
    startup
    Scene 1

4.your story comes after all that

1 Like

Out of interest, where does the [quote]nav = new SceneNavigator([“startup”]);
stats = {};[/quote]
come from? Is that something you copied in, or was it already there? Asking because that was never in the startup file I have, though perhaps it’s a newer version of CS. If you delete those lines will it load then?

1 Like

Remove that. That would have come from an out of date guide. (The *scene_list and *create commands now do the same function).

1 Like

It was there from the start when I opened up the mygame.js file – but according to another reply on this post this is from an outdated guide. Gah! It’s frustrating to think that ChoiceScript .zip or whatever doesn’t get updated.

Also, nah, deleting it doesn’t work. Still won’t load. D:

Okay, so, I’ve tried doing that; the page looks like this now, more like your setup:

*title My First ChoiceScript Game
*author Anonymous

*create variable1
*create variable2
*create variable3

*scene_list
  startup
  Scene1

Welcome to your very first ChoiceScript game!

But I’m afraid it’s still not working. :frowning: Same errors as before.

the create functions are for ‘your’ variables sweetness i just used generic names and ‘placeholders’
*create ‘your variable goes here’

same for the ‘scene1’ bit until you ‘have’ a scene you only need to list the ‘startup’

you’ll have to be more specific with whats going wrong and reread the tutorials to get an idea of whats’ going on.

1 Like

Hi there,

Good luck with your experimentations, so far during mine I’ve not had any errors like the ones you are describing.

I’ve only been editing text files and not javascript files.

I did DL and install mozilla firefox as the browser to use for running choice script as documentation does warn that you can get weird errors in other browsers.

Take Care

Florence

1 Like

Okay, that’s the problem. That’s not the file you should be putting the game in (in fact you shouldn’t be changing anything in that file at all). Here, the first part of my guide here should help you get started in the right direction, but the short is the text (.txt) files in the scene folder is where everything should be. If you’ve messed with anything else you may want to just DL a fresh copy of CS too (there’s a link in the guide).

(Where I said to delete it, that was actually bad advice. I’ve just never seen someone start by opening up the javascript files, so I assumed you copied it over from somewhere. That should actually still be in there. My bad.)

1 Like

Goddamn… thanks for pointing that out!!! I guess I fucked up on finding the right files that I was directed to. I’ll have to read more carefully or something next time. Thank you for helping me! I’ll try this again.