I don't understand what I'm doing wrong


#1

[code]
*title Choice of the Spaceship Captain
*author Andy
*scene_list
startup

*create Hull 0
*create Crew 0
*create Speed 0
*create Weapons 0
*create Happiness 0
*create name "name"
*create spaceship "spacename"
*create gender "unknown"

*label start
You wake up on a desk with your computer monitor still on. You spent all of last night studying for the academy finals to finally become a captain of a spaceship! What's your name?
*label typename
*input_text name
Is ${name} correct?
*choice
	#Yes!
		Okay let's move on to your gender.
		*goto gender
	#Nope, typo.
		retype it..
		*goto typename
Are you a boy or a girl?
*label gender
	#I'm a boy!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
	#I'm a girl!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
*label Backstory
[/code]

Error message says "startup line 29: increasing indent not allowed, expected 0 was 1"
halp.

#2

Well you don’t even have 29 lines of code there. Please can you post it all, sometimes errors can be carried through. Also use [code]paste code here[/code] markup.


#3

I actually just fixed it so your indents would show but you seem to have fixed it back. In order to get indents to show highlight all of your code, then click the button that says “preformatted text” (on the same bar as the smiley, quote button, link, bold, etc is).


#4

Okay, firstly you should do

*label gender

Are you a boy or a girl?

*choice
	#I'm a boy!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
	#I'm a girl!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory

#5

It worked! Sorry for dumb mistakes, I’ve redone that entire code 4 times and I couldn’t get it right. If I have anymore questions should I just edit this one to my question?


#6

If you’ve more questions post them here, make separate posts if you like and we’ll answer them.


#7

ok thanks, this code gets really confusing sometimes.


#8

It does. I found it extremely difficult to start with. Eventually it clicked though.

Incidentally I wrote A Basic Tutorial on Name, Relationship and Gender Variables to try and help with understanding basic startup things.


#9

New question, why isn’t this working

*label gender

Are you a boy or a girl?

*choice
	#I'm a boy!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
		*set gender "male"
	#I'm a girl!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
		*set gender "female"

After this is done, gender isn’t set to “male”


#10

You might want to try putting *set before you *goto somewhere else.


#11

haha ok thanks XD

Post must be 20 letters so I’m writing this useless text here to take up space.


#12

Since you just wanted to express your gratitude, next time, instead of typing “useless text,” you could click the “heart” icon to Like the post.


#13

Andd… need help again

You wake up on a desk with your computer monitor still on. You spent all of last night studying for the academy finals to finally become a captain of a spaceship! Your pocket buzzes from your phone. You pull your phone out of your pocket and see your friend's name on the phone's screen he's calling you.
Who is your best friend?

*Choice
	*if (clone) #blah blah blah

error message says "line 7: Expected choice body"
dunno what I’m doing wrong


#14

Have a read of everything on the webpage. https://www.choiceofgames.com/make-your-own-games/choicescript-intro/

Then have a look at the wiki. choicescriptdev.wikia.com

And if you’re looking for help can you please paste everything.


#15

that is everything it’s my second scene.
I’m trying to make it so if clone=true i can see that option and select it.


#16

You need to have text underneath, or a goto or something.

Use the IDE @CJW made. https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html Put text into it, fiddle about with it until things work.


#17

Alright, i am sorry for using your discussion but it seems that your problem is solved and i do not wish to create a new post for such a small problem.

AH is it possible to somehow have spaces in a stat:

For example:

*create friendship with Decimus


#18

I think you need to use underscores so friendship_with_decimus


#19

When you create a stat, you have to give it a value, so you’d do something like this:

*create decimus_friendship ""

and in the stat screen you would type it in like this

*stat_chart
    text decimus_friendship Friendship with Decimus

which would display as “Friendship with Decimus:”


#20

Oh, i thought that would have made the underscores appear on screen as well, guess i was wrong. Thanks guys.