Tables and picture

Hello, all:

I am trying to get Inform to display the picture of an item that is looked up in the dictionary. But I cannot get this to work:

Instead of consulting the metal book about a consult listed in the Table of Metal Book's Responses:
	play the sound of the book;
	say "The book buzzes and clicks and then a male computer's voice says:[paragraph break] '[response entry]'[paragraph break]";

Table of Metal Book's responses
Consult (a topic)	Response	Picture
"diode"	"A diode is a two-terminal electronic component that conducts current primarily in one direction (asymmetric conductance); it has low (ideally zero) resistance in one direction, and high (ideally infinite) resistance in the other.  LED means 'Light Emitting Diode', which you may recognize from day-to-day usage.  Their value is measured in Volts."	"diode.jpg"

The problem is that it treats the “diode.jpg” as text, I can’t substitute the value of it for language such as:

 display the figure of image "[picture entry]"
 display the figure of image picture entry

But I cannot substitute text from a table in this fashion. How can I code this so that the picture loads with the text?

You need to declare the figures (chapter 23.5). Then you can use the values in a table.


The Kitchen is a room.

The metal book is in the Kitchen.

Figure of Resistor is the file "resistor.png".
Figure of Diode is the file "diode.png".

Table of Metal Book's responses
Consult (a topic)	Response	Picture
"diode"	"A diode is blah blah blah."	Figure of Diode
"resistor"	"A resistor is blah blah blah."	Figure of Resistor

Instead of consulting the metal book about a consult listed in the Table of Metal Book's Responses:
	say "The book buzzes and clicks and then a male computer's voice says:[paragraph break] '[response entry]'[paragraph break]";
	display the picture entry;

1 Like

I can’t hide a smile, for the involuntary remote reference to High Tech Drifter

Best regards from Italy,
dott. Piergiorgio.

Hello, all:

This still does not work. Do I need to title the picture column of the table differently?

figure of death is the file "RWS_Tarot_13_Death.jpg"

Instead of consulting the metal book about a consult listed in the Table of Metal Book's Responses:
	play the sound of the book;
	display the picture entry;
	say "The book buzzes and clicks and then a male computer's voice says:[paragraph break] '[response entry]'[paragraph break]";

Table of Metal Book's responses
Consult	Response	Picture
"The Death"	"Death is the most feared of the Tarot cards and the most misunderstood."    figure of death

Are you getting an error?