Trouble with line breaks after a long to-say statement:

Anyone able to help me eliminate the extra carriage return after this phrase?

I’ve tried run paragraph on, and no line break.

[spoiler] some mahogany bookcases are a door. "[mahoganydesc]". It is east of Library and west of King's Pass. Understand "bookcase/bookshelf/misaligned/slightly" as mahogany bookcases. The description is "[one of]You see nothing special about the mahogany bookcases.[or]You see nothing special about the mahogany bookcases.[/p]Well, except one that is slightly misaligned with the others.[or]You see nothing special about the mahogany bookcases except the one that is slightly out of alignment with the others.[stopping]"

To say mahoganydesc: if the location is Library: if mahogany bookcases are closed: say "The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness.[/nl]"; if mahogany bookcases are open: say "The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness. One section of bookcase has been swung out from the wall at a forty-five degree angle, revealing a dark passage to the east.[/nl]"; if the location is King's Pass: if mahogany bookcases are closed: say "To the west is the unpolished back of the closed mahogany bookcase.[/nl]"; if mahogany bookcases are open: say "To the west, the mahogany bookcase angles out, admitting a stripe of light into the dark corridor you stand in.[/nl]".[/spoiler]

This produces:

[code]>open bookcase
You open the mahogany bookcases.

look
Library
The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness. One section of bookcase has been swung out from the wall at a forty-five degree angle, revealing a dark passage to the east.

[/code]

Any ideas? (I have /nl set to say “[no line break]”)

Take the periods out of the say phrase, and put one in the top-level description instead.


some mahogany bookcases are a door.  "[mahoganydesc]."  It is east of Library and west of King's Pass.  

To say mahoganydesc:                                                         
	if the location is Library:                                               
		if mahogany bookcases are closed:                                      
			say "The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness";                                                            
		if mahogany bookcases are open:                                        
			say "The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness. One section of bookcase has been swung out from the wall at a forty-five degree angle, revealing a dark passage to the east";        
	if the location is King's Pass:                                           
		if mahogany bookcases are closed:                                      
			say "To the west is the unpolished back of the closed mahogany bookcase";                                                             
		if mahogany bookcases are open:                                        
			say "To the west, the mahogany bookcase angles out, admitting a stripe of light into the dark corridor you stand in".                

This punctuation dance is not my favorite part of I7, but it works.

You should try this.

[code]To say mahoganydesc:
if the location of the player is the library begin;
if the mahogany bookcases are closed begin;
say “The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness”;
otherwise if the mahogany bookcases are open;
say “The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness. One section of bookcase has been swung out from the wall at a forty-five degree angle, revealing a dark passage to the east”;
end if;
otherwise if the location of the player is the king’s pass;
if the mahogany bookcases are closed begin;
say “To the west is the unpolished back of the closed mahogany bookcase”;
otherwise if the mahogany bookcases are open;
say “To the west, the mahogany bookcase angles out, admitting a stripe of light into the dark corridor you stand in”;
end if;
end if.

Some mahogany bookcases are a door. “[mahoganydesc].”. The mahogany bookcases are east of the Library and west of the King’s Pass. The description of the mahogany bookcases is “[one of]You see nothing special about the mahogany bookcases[or]You see nothing special about the mahogany bookcases. Well, except one that is slightly misaligned with the others[or]You see nothing special about the mahogany bookcases except the one that is slightly out of alignment with the others[stopping].”. Understand “bookcase/bookshelf/misaligned/slightly” as mahogany bookcases.[/code]

The only problem is that zarf beat me to it. :slight_smile:

To say statements and finalising puctuation (full stops etc) do not play nicely together. As a general rule to prevent this, try putting the fulls stop at the front of the say statements rather than behind.

To say mahoganydesc: say "Paragraph of text beforehand"; [this will show up with full stop at end] if the location of the player is the library begin; if the mahogany bookcases are closed begin; say ". The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness"; otherwise if the mahogany bookcases are open; say ". The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness. One section of bookcase has been swung out from the wall at a forty-five degree angle, revealing a dark passage to the east"; end if; otherwise if the location of the player is the king's pass; if the mahogany bookcases are closed begin; say ". To the west is the unpolished back of the closed mahogany bookcase"; otherwise if the mahogany bookcases are open; say ". To the west, the mahogany bookcase angles out, admitting a stripe of light into the dark corridor you stand in"; end if; end if.

Here, the text will display as expected with no extra line breaks.

Hope this helps.

As an alternative, you could leave “[mahoganydesc]” as is (no period) and add a space between the final period and closing quotes of the various descriptions:

To say mahoganydesc: if the location is Library: if mahogany bookcases are closed: say "The entire room is well-appointed with mahogany wood bookcases packed tightly with volumes of every color and thickness. ";[<- added space here] ... etc.

Thank you all so much! I knew there was a way to do this.

So period at end is bad, put the period at the beginning of the phrase that follows, or leave a space after a period.

Oh my gosh, why isn’t this recipe #1??

An open square bracket ("[") behaves very much like the end of a text (closing quotes). If there is sentence-final punctuation immediately before it, the punctuation will usually be followed by a line break. Things get more complicated when you have different phrases, activities and rules outputting text together, but that’s a good basic rule to start with.