Help with "error startup line 2"

Hi! I just started using choicescript, and I’m still confused, even though I read the “intro to choicescript” and “important choicescript commands” webpages. My problem is that when I type the line,
*create self-defense 20
an error comes up when I try to use the index. It says “startup line 2: invalid create instruction, value must be a number, true/false, or a quoted string: self-defense 20”. I’ve tried putting quotes around the 20, and changing it to this:
*title: The Witch’s Child
*create etiquette
*set etiquette 20
*create self-defense
*set self-defense 20
This is lines 1 to 5. Is there something that I’m suppose to put to tell the game to actually start? I tried putting *startup and startup without the star, but that didn’t work. I also don’t see why it’s skipping the line about etiquette. I also tried indenting them using the tab button. Anyways, I should probably add that I’m really confused with trying to code this and so I’m probably missing something very obvious, and any help would be appreciated. Thank you very much!

Only alphanumeric or underscores are allowed in variable names. The dash (-) is invalid, instead use and underscore: self_defense.

Hi! Thank you for responding so quickly to my question. However, the game seems to think that it still has the dash, even though I used an underscore this time. I saved the changes, closed the old index, then opened it again, but it’s still saying the same thing. This is the text document:

Try F5, it may still be caching the old version.

But then this is the game text whenever I try to open it:

Thank you again for trying to help me. I’m using notepad, if that might matter.

Oh, you’re not creating etiquette with a starting value. It’s just:

*create etiquette 20
*create self_defense 20

And *title should not have a colon in it.

1 Like

So, I’m trying to press F5 when I’m on the screen where it opens my game after I click index- that’s what you mean, right? I did that, then reopened it, but it’s just acting like it’s refreshing and the same thing pops up. It’s still the same exact thing as the last screenshot. Thank again for trying to help me; I don’t know why my computer is being so ridiculous. I changed those things you suggested in your previous message.

I forget how to use the indents for quoting code. This is a snippet from my own wip startup. Might help you with the layout of your one. (My scene list is indented but i forgot how to show that, sorry). Also, why are you making a stat chart in startup?


*title The Gift: Uprising
*author CV Cottle
*scene_list
startup
welcome
childhood
lab_five
ageten
family10
ending
anna_talk
task_day
prologue
jargon
beasts
skills
skill_boost
hints
death

*create name “Unknown”
*create surname " "
*create gender “Unknown”
*create male false
*create female false
*create age “Unknown”

*comment status/skills
*create lifeforce 100
*create vigor 10
*create smarts 0
*create hunt 0
*create cook 0
*create charm 10
*create mma 0
*create sneak 0

In my experience, people have problems with this when they have multiple copies of startup.txt on their computer. They’re editing one file, but viewing another in their browser.

Try backing up your files, deleting all copies of ChoiceScript from your computer, refreshing your browser to make sure the game is really gone, then starting afresh.

@Silverstone, Thank you for showing me some of your code. I forgot to add the scene list at the beginning-though I just have the start of one, I guess I’ll build it as I go on. As for the stat chart, I was going to show it at the very beginning and end of the game.
@dfabulich, Thank you for your suggestion. I’ll try to do that and see if it fixes this problem. I’ll have to get back to you later- probably tomorrow, hopefully.

Thank you to all the people who are trying to help me.

No worries. Oh okay, I did that to between one of the chapters. Hope your game begins to work now.

Thank you, guys, for your help. @dfabulich, that seems to have fixed the problem. Thank you very much for your help!