So I’ve been fighting with this for a few days now. I’ve been trying to figure out how to modify the examples in the Recipe Book section 5.2 to let me do both of these things, but it just isn’t working right. I don’t actually get any errors, but it isn’t working right in the game test.
My source
Getting Started is a room. Getting Started is private.
Gender is a kind of value. The genders are masculine, feminine, and nihil. Understand “male” or “man” or “M” as masculine. Understand “female” or “woman” or “F” as feminine.
A person has a gender. The gender of the player is nihil.
The player’s forename is an indexed text that varies. The player’s full name is an indexed text that varies.
When play begins:
now the command prompt is “Are you a man, or woman? >”.
After reading a command when the gender of the player is nihil:
if the player’s command includes “[gender]”:
now the gender of the player is the gender understood;
if the gender of the player is nihil:
say “This story requires a selection of male or female. [run paragraph on]”;
reject the player’s command;
if the gender of the player is masculine, now the player is male;
if the gender of the player is feminine, now the player is female;
now the command prompt is “What is your name?”;
To decide whether collecting names:
if the command prompt is "What is your name? > ", yes;
no.
After reading a command when collecting names:
if the number of words in the player’s command is greater than 5:
say “[paragraph break]Who are you, a member of the British royal family? No one has that many names. Let’s try this again.”;
reject the player’s command;
now the player’s full name is the player’s command;
now the player’s forename is word number 1 in the player’s command;
now the command prompt is “>”;
move the player to The Chamber;
say “[line break] You wake up cold and disoriented…”;
reject the player’s command.
The game test gives me this.
Getting Started
Are you a man, or woman? >man
That’s not a verb I recognise.
What is your name?john smith
That’s not a verb I recognise.
What is your name?
Does anyone have any idea what I’m doing wrong?