OK, I’m pretty close to giving up on letting the player choose their own name, but I want to make sure I personally am not doing anything wrong.
(inb4 “dude read da rulz” “use da search man” “wow first post and it’s asking for help that’s new /sarcasm”)
Well the problem seems to be in my code.
Here’s the name entering code (a slightly modified version of the “Identity Theft” example)
[code]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 3:
say “[paragraph break]The secretary looks at you tiredly and sighs. She tears the top page off the clipboard revealing a clean sheet. ‘You may enter up to three names: a first, a middle, and a last. If you don’t want to write them all down, that’s ok.’”;
reject the player’s command;
now the player’s full name is “[the player’s command in title case]”;
now the player’s first name is word number 1 in the player’s full name;
now the player’s last name is the last word in the player’s full name;
now the command prompt is “>”;
now name entered is true;
say “The secretary takes the clipboard, ‘Ok, mister… [player’s last name].’ You cringe at how terribly she mispronounces your name. 'You’ll want to go over into that room over there and just follow the staircase down until you come across the Test Room. Don’t go into any of the rooms besides the corridor. [paragraph break]Marigold nearly runs off without you. ‘Come ON, [player’s first name]!’”;
reject the player’s command. [/code]
The error I get when using this code:
[spoiler][code]
This is the report produced by Inform 7 (build 6G60) on its most recent run through:
In Part 3 - The Gameplay:
Problem. In the sentence ‘now the player’s full name is “[the player’s command in title case]”’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘player’s full name is “[the player’s command in title case]”’.
I was trying to match this phrase:
now (player’s full name is “[the player’s command in title case]” - a condition)
This was what I found out:
player’s full name is “[the player’s command in title case]” = something unrecognised
Problem. In the sentence ‘now the player’s first name is word number 1 in the player’s full name’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘player’s first name is word number 1 in the player’s full name’.
I was trying to match this phrase:
now (player’s first name is word number 1 in the player’s full name - a condition)
This was what I found out:
player’s first name is word number 1 in the player’s full name = something unrecognised
Problem. In the sentence ‘now the player’s last name is the last word in the player’s full name’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘player’s last name is the last word in the player’s full name’.
I was trying to match this phrase:
now (player’s last name is the last word in the player’s full name - a condition)
This was what I found out:
player’s last name is the last word in the player’s full name = something unrecognised
Problem. In the line ‘say “The secretary takes the clipboard, […] ‘Come ON, [player’s first name]!’”’ , I was expecting that ‘player’s last name’ would be something to ‘say’, but it didn’t look like any form of ‘say’ that I know. So I tried to read ‘player’s last name’ as a value of some kind (because it’s legal to say values), but couldn’t make sense of it that way either.
Sometimes this happens because punctuation has gone wrong - for instance, if you’ve omitted a semicolon or full stop at the end of the ‘say’ phrase.
I was trying to match one of these phrases:
-
say "“The secretary takes the clipboard, 'Ok, mister… " - text”
-
say “player’s last name - text”
-
say “[player’s last name - number]”
-
say “[player’s last name - unicode character]”
-
say “[player’s last name - sayable value]”
-
say “”.’ You cringe at how terribly she mispronounces your name. 'You’ll want to go over into that room over there and just follow the staircase down until you come across the Test Room. Don’t go into any of the rooms besides the corridor. " - text"
-
say “[paragraph break]”
-
say “paragraph break - text”
-
say “[paragraph break - number]”
-
say “[paragraph break - unicode character]”
-
say “[paragraph break - sayable value]”
-
say "“Marigold nearly runs off without you. 'Come ON, " - text”
-
say “player’s first name - text”
-
say “[player’s first name - number]”
-
say “[player’s first name - unicode character]”
-
say “[player’s first name - sayable value]”
-
say “”!’" - text"
This was what I found out:
player’s last name = something unrecognised
paragraph break = something unrecognised
player’s first name = something unrecognised
[/code][/spoiler]
and for completeness’ sake, here’s my whole code:
[spoiler][code]“Royalty” by Daniel ‘Orangestar’ O’Day
Part 1 - The Options
Include Basic Screen Effects by Emily Short.
Use full-length room descriptions and no scoring. Use serial comma.
Part 2 - Before the Gameplay
When play begins:
say “‘Isn’t this exciting? It’s our 15th birthdays! We get to take The Test! I know you’ll ace it, though. 100%!’[paragraph break]You walk down the long, winding streets to the Test Center, with Marigold watching your every step. ‘Come on, Mary. You know non-royalty isn’t allowed to see the test. How can you be certain I’ll get a perfect score?’[paragraph break]Marigold playfully slaps your shoulder. ‘Oh pshaw,’ she replies. ‘I’m just trying to be optimistic! Don’t you ever wonder what it’s like to be a part of royalty? To live on the Floating Halo, high above the walls of the city? I’ve always wondered what they do up there all day… in their airships just flying around all day…’[paragraph break]‘Marigold, what if we fail the test though? Nobody’s ever come out of the Test Center-’[paragraph break]Marigold interrupts you with a sudden burst of vigor. ‘Oh we’re here! Let’s go in! Come on!’ She heads into the building before you can say anything.”;
pause the game.
Marigold following is a truth state that varies. Marigold following is false.
Name entered is a truth state that varies. Name entered is false.
Part 3 - The Gameplay
[how the source is usually read:]
[A room, with description]
Outside the Test Center is a room. “You are standing outside the Test Center where Marigold ran in without your permission earlier. The cool summer breeze blows through your hair as busy people bustle down the streets, children play in a nearby lawn, and The Floating Halo quietly hovers above the city.”
[things in the room]
The player is in the Test Center. Children, busy people, sunbathers, and The Floating Halo are scenery in the Test Center.
[and the description of those things.]
The description of the children is “The gleeful cheers of the children are not what you should be paying attention to right now.”
The description of the Floating Halo is “The Floating Halo looms ominously over you. In most areas of the city, what with the Halo covering most of it and the walls blocking the view of the horizon, there is nothing but darkness. Usually, the sun fits just right in the sky to show perfect light into the city, making high noon a prime time to watch sunbathers line the streets.”
The description of sunbathers is “Well, there aren’t any sunbathers now. It’s 4… or something like that. You don’t have a watch.”
The description of busy people is “You could try getting one of their attentions, but trust me, nobody will listen to you. They all have their own matters they’d like to take care of first before helping you with your seemingly minuscule problems.”
.
[Test Center’s Entrance]
The Test Center’s Entrance is north of Outside the Test Center. "You enter the Test Center into a small room. The walls are painted the blandest color of gray man’s eyes have ever seen. "
The table is a thing in the Test Center’s Entrance.
In the Test Center’s Entrance is a woman called the secretary. The initial appearance of the secretary is “A secretary stares at you behind the table.”
Carry out going to the Test Center’s Entrance for the first time:
say “Marigold notices you and waves at the nearby table. ‘Hey! come over here! You gotta sign in for The Test. Come on, slowpoke! I already signed and now I’m waiting on YOU.’”.
Marigold is a woman in the Test Center’s Entrance. “Marigold is running around the room, as usual.”.
Every turn:
If the location of Marigold is the location of the player:
say “Marigold says, ‘I’ll follow you!’”;
now marigold following is true;
if marigold following is false:
stop;
otherwise:
if the location of Marigold is not the location of the player:
let the way be the best route from the location of Marigold to the location of the player, using doors;
try Marigold going the way;
otherwise:
say “[one of]Marigold rushes about the room.[or]Marigold sits for a while, but can’t take it and stands back up.[or]Marigold smiles pleasantly at you.[or]Marigold begins to look bored.[or]Marigold begins to get antsy.[or]Marigold says ‘Can we go yet?’[as decreasingly likely outcomes]”.
[Instead of talking to the secretary:
say “Before you have the chance to speak, the secretary begins a heavily rehearsed ramble.[paragraph break]‘Welcome to the Test Center. This is where you will take The Test which will determine whether you will join the royalty in the Floating Halo. Please write your name down on this clipboard.’ The secretary produces a clipboard as she says so.[paragraph break]‘You may enter up to three names: a first, a middle, and a last. If you don’t want to write them all down, that’s ok.’”;
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 3:
say “[paragraph break]The secretary looks at you tiredly and sighs. She tears the top page off the clipboard revealing a clean sheet. ‘You may enter up to three names: a first, a middle, and a last. If you don’t want to write them all down, that’s ok.’”;
reject the player’s command;
now the player’s full name is “[the player’s command in title case]”;
now the player’s first name is word number 1 in the player’s full name;
now the player’s last name is the last word in the player’s full name;
now the command prompt is “>”;
now name entered is true;
say “The secretary takes the clipboard, ‘Ok, mister… [player’s last name].’ You cringe at how terribly she mispronounces your name. 'You’ll want to go over into that room over there and just follow the staircase down until you come across the Test Room. Don’t go into any of the rooms besides the corridor. [paragraph break]Marigold nearly runs off without you. ‘Come ON, [player’s first name]!’”;
reject the player’s command.
Before going east:
if name entered is false:
say “You’re not allowed to enter the Center until you’ve signed your name at the table. Try talking to the woman at the counter.”;
stop.
[Main Corridor]
Main Corridor is east of the Test Center’s Entrance.[/code][/spoiler]
Here’s the nuts part: Commenting out every single line I’ve used for entering names and replacing it with the default code for “Identity Theft” does not work either, giving me very similar errors! What’s going on here?