You need to 'reject the player's command' at the end of the first 'after reading a command' rule.
The command prompts still don't match ("What is your name?>" vs. "What is your name? >).
And there is some logic affecting trouble with the indentation in the 'after reading a command' rules.
This, I think, is what you want (with changes in mere indentation marked by '[]' and other changes by '[!]'):
Code:
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."; [!]
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; []
say conditional paragraph break; [!]
now the command prompt is "What is your name? >"; [!]
reject the player's command. [!]
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 "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 ">"; []
say conditional paragraph break; [!]
[ reject the player's command; ] [!]
[ move the player to The Chamber;] [!]
say "[banner text]"; []
move the player to The Chamber; [!]
say "[line break] You wake up cold and disoriented..."; []
reject the player's command. []