Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001899Core InformUnderstandingpublic2016-04-26 09:542016-04-26 11:32
Reporterjsimmons 
Assigned To 
PrioritynormalSeverityseriousReproducibilityalways
StatusnewResolutionopen 
PlatformMicrosoft SurfaecOSWindowsOS Version10
Product Version6M62 
Target VersionFixed in Version 
Summary0001899: Error Code 10 when collecting names.
DescriptionWhen understanding a command as specific words, I can't be sure if this even works, because when I try to run it, it returns Error 10.
It's a complicated situation, that is probably not used by anyone, but I want this to be a special situation, that when customizing the player character (with a name and gender), if the player types in a specific name, something special happens, like an easter egg. In this case, a Harry Potter easter egg. But the error code 10 is preventing me from debugging this code regularly. If I take away the code, the game compiles perfectly.
Minimal Source Text To Reproduce
The player's forename is a text that varies. The player's full name is a text that varies. The player's 
surname is a text that varies. The player's middlename is a text that varies.

When play begins:
	now the command prompt is "What is your full name? > ".

To decide whether collecting names:
	if the command prompt is "What is your full name? > ", yes;
	no.
	
To decide whether collecting gender: 
	if the command prompt is "Are you male or female?> ", 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]Just first, middle and last will do nicely. If you have more than one first, 
middle or last name, pick your favorite so we can move on. (Please note that this is for in-game purposes 
only, and NO ONE else will see what you've written here.)";
		reject the player's command;
	if the number of words in the player's command is less than 3:
		say "[paragraph break]First, middle and last name please. We need all three to put your name on 
the mailing list for Hogwarts. If you don't have a middle name, or don't wish to share it, you can use 
an initial. (Please note this is for in-game purposes only, and that I as the writer CANNOT see what 
you've written here.)"; 
		reject the player's command;
	now the player's full name is "[the player's command in title case]";
	now the player's forename is word number 1 in the player's full name;
	now the player's middlename is word number 2 in the player's full name;
	now the player's surname is word number 3 in the player's full name;
	now the command prompt is "Are you male, or female? >";
	say "Hi, [player's forename]![paragraph break]";
	reject the player's command.
	


After reading a command when collecting names: 
	if the player's forename is "Tom";
		if the player's middlename is "Marvolo";
			if the player's surname is "Riddle";
	Now the gender of the player is masculine;
	say "Is that so? This should be interesting.";
	reject the player's command.
After reading a command when collecting names:
	If the player's forename is "Harry";
		if the player's middlename is "James";
			if the player's surname is "Potter";
	Now the gender of the player is masculine;
	say "Well, this calls for a very special game."
			



Instead of looking when collecting names: do nothing.

Rule for printing the banner text when collecting names: do nothing.

Rule for constructing the status line when collecting names: do nothing.

To decide whether collecting gender: 
	if the command prompt is "Are you male or female?> ", yes;
	no.
	
 Gender is a kind of value. The genders are masculine, feminine, and unknown. 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 unknown.

After reading a command when the gender of the player is unknown: 
	if the player's command includes "[gender]": 
		now the gender of the player is the gender understood;
	if the gender of the player is unknown: 
		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; 
	say "[line break]Thank you. We now begin..."; 
	now the command prompt is ">"; 
	say "[banner text]";
	move the player to the location;
	reject the player's command; 

Instead of looking when collecting gender: do nothing.

Rule for printing the banner text when collecting gender: do nothing.

Rule for constructing the status line when collecting gender: do nothing.
			
TagsNo tags attached.
Effect(critical) Compiler reports internal error
Attached Files

- Relationships
duplicate of 0001837confirmed Crash on wrongly-terminated if phrase 

-  Notes
(0004438)
zarf (developer)
2016-04-26 10:39

This is the same error described in http://inform7.com/mantis/view.php?id=1837 [^] . It occurs when you write an "if" statement and put a semicolon after the condition part. You have to either end the condition with comma (if you're putting the if statement all on one line) or a colon (if you're splitting it up).

In your code, look the if statements in the stanza

After reading a command when collecting names:

You have semicolons where you should have colons.

When you fix that, your code still has errors, but it would be better to ask about those on intfiction.org or another user forum.
(0004439)
jsimmons (reporter)
2016-04-26 11:32

Thanks, it concerned me when it didn't compile, instead of throwing up the normal "There's something wrong with your source code" error message. I will follow your advice.

- Issue History
Date Modified Username Field Change
2016-04-26 09:54 jsimmons New Issue
2016-04-26 10:34 zarf Relationship added duplicate of 0001837
2016-04-26 10:39 zarf Note Added: 0004438
2016-04-26 11:32 jsimmons Note Added: 0004439


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker