I’m trying to use example 414 to allow the player to set their name. I have already declared the variables under the people kind, but inform is pissed at me for it for some reason.
[code]A person has a text called first name. The first name of a person is usually “Stranger”.
A person has a text called full name. The full name of a person is usually “Stranger”.
The player is a person.
To decide whether collecting names: [From example 414]
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]I would love to let you have more than five names, but we gotta draw a line somewhere. Try again.”;
reject the player’s command;
*now the player’s full name is the player’s command;
*now the player’s first name is word number 1 in the player’s command;
now the command prompt is “>”;
*say “Hi, [player’s first name]![paragraph break]”;
reject the player’s command.[/code]
I think the problem is either I accidentally made [first name] and [full name] constants instead of variables (I tried calling it a text variable, but inform complains at that too), or it doesn’t like something about the phrase “player’s full/first name.” If someone could fix my error, or tell me what I’m doing wrong, that would be fantastic. Thank you!
Edit: forgot to specify, I marked the lines that the compiler complains about with a *, and added the line of code that says the player is, in fact, a person.