Where is the extra line break in this command coming from?

My game has a guidebook. The player can access the guidebook either by examining a specific page, or by looking a topic up, which I’ve done by giving the book a table with contents and asking it to examining the corresponding page (similarly to how it’s done in the example in the documentation). However, looking something up adds an extra line break before the description that isn’t there when I just examine the page:

>x page 1
The page is blank.

>look up beetle in guidebook

The page is blank.

I’ve looked at my code and tried to add [no line break] in a few places, but I can’t figure out what’s causing that extra line break to appear or how to remove it. Is it possible to get rid of it somehow?

A book is a kind of thing. A book has a table name called the contents.

Instead of consulting a book about a topic listed in the contents of the noun:
	say "[reply entry]".

The player carries a book called The Species Guidebook. The contents of the Guidebook is the Table of Listed Species.

Table of Listed Species
topic		reply
"beetle"	"[look up beetle]"

To say look up beetle:
	try examining Page 1.

A thing called Page 1 is part of the Guidebook. The description is "The page is blank."

This is caused by calling a new action (try examining page 1) while already in a say instruction. It’s too late by then to stop the line break.

I suggest that you list the actual pages in your table, rather than texts to say.

A book is a kind of thing. A book has a table name called the contents.

Instead of consulting a book about a topic listed in the contents of the noun:
	try examining the page entry.

The player carries a book called The Species Guidebook. The contents of the Guidebook is the Table of Listed Species.

Table of Listed Species
topic		page
"beetle"		page 1

A thing called Page 1 is part of the Guidebook. The description is "The page is blank."

This is simpler, and avoids the problem of the unwanted line break.

4 Likes

I didn’t realize I could do it like that, thanks for the help!