Need Help with Starting Out

Hi, I’m really new at this, but i’m trying to create a game.
Basically I have two games thus far. One i’m working on is really basic, with no gender, no stats etc. And that one can run perfectly.
However I’m getting a problem with my other game.
Will post the draft code below for the section i’m having problems with. Basically every time it gets to the Master/Mistress part, it doesn’t work, and i’m not sure whats wrong.
It will say: line 62: Non-existent variable ‘male’
What does that mean? :slight_smile:

*page_break
“BANG!”
*line_break
You hear a scream.
*line_break
Red. That’s all you see. Red.

Someone shouts your name! You turn around and see Jones, your Butler calling out to you.

*label gender
Are you a Young Master or Young Mistress?

*choice
#Master
Ah, so you’re a Young Master. It’s truly an honor.
*set gender “male”
*goto naming
#Mistress
Ah, so you’re a Young Mistress. It’s truly an honor.
*set gender “female”
*set male false
*set master “mistress”
*set he “she”
*set him “her”
*set his “her”
*set sir “ma’am”

	\*goto naming

*label naming
What is your name?

*choice
*if male
#James
*set name “James”
*goto butler_call
*if male

	#Evan
		\*set name "Evan"
		\*goto butler_call
\*if male
	#Howard
		\*set name "Howard"
		\*goto butler_call
\*if male
	#Joseph
		\*set name "Joseph"
		\*goto butler_call
\*if male
	#I would like to decide a name for myself.
		Very Well. What would it be?
		\*input_text name
		\*goto butler_call
\*if male = false
	#Elizabeth
		\*set name "Elizabeth"
		\*goto butler_call
\*if male = false
	#Jasmine
		\*set name "Jasmine"
		\*goto butler_call
\*if male = false
	#Belle
		\*set name "Belle"
		\*goto butler_call
\*if male = false
	#Victoria
		\*set name "Victoria"
		\*goto butler_call
\*if male = false
	#I would like to decide a name for myself.
		Very Well. What would it be?

		\*input_text name
		\*goto butler_call

*label butler_call

Master ${name}! Master ${name}!
You realize Jones is running toward you frantically. His face is wet with perspiration.

*finish

I see the line *set male false but did you ever define male in mygame.js or *temp male?

Ah… Thanks. I think I know what you mean. That would probably be whats wrong. :slight_smile:
Don’t mind me asking, how should defining in mygame.js look like?

In mygame.js, there is a section that starts

stats = (

add a line:

,male: false

Got it! Thank you so much!!!

You’re welcome.

Please consider sharing links to the games with us to try them out when ready :slight_smile:

How do you fix the problem “expected choice body”? My code seems perfect but it still crashes!

Generally a choice will look like this:

Blah de blah de blah
*choice
#optionA
----blah blah
----*goto blah2
#optionB
----blah blah
----*goto blah3
#optionC
----blah blah
----*finish

*label blah2
Blah de blah blah

*label blah3
Blah blah blah

You can have more (or less) options within the *choice. Each option MUST have a *goto or *finish before you reach the next option.

I’ve got another question. Is it possible to have hidden stats? (like the one in Vampire)
Like the stats will be calculated based on certain actions, but it doesn’t show on the stat screen…

Yes! The stat screen only shows the stats you put on it.

As long as you define global (= for all scenes) stats in the mygame.js file stats work perfectly well without being on the stat screen.

I think hidden stats can be useful, but seeing the stats is satisfying for many people who want to keep score how ell they are doing. So you need to think carefully which stats should be hidden and which should be shown.

Good luck with your game.

Thanks! :slight_smile:

I’m gonna be sharing it for testing soon:)
Getting some parts ironed out.