Am having a very odd one. It’s probably a syntax problem but I’m damned if I can work out what:
Here’s the code:
[code]A colour is a kind of value. The colours are Blue, Green, Red, Yellow.
L is a list of colours that varies.
Table of ColorfulThings
creature Hues(a list of colours)
Cat {}
Dog {}
After examining the cat:
Add Blue to Hues corresponding to the creature of Cat in the Table of ColorfulThings;
Add Green to Hues corresponding to the creature of Cat in the Table of ColorfulThings;
Add Blue to L;
Add Green to L;
say “[L].[Hues corresponding to the creature of Cat in the Table of ColorfulThings].”;
showme the contents of the Table of ColorfulThings.
The Kitchen is a room. “Many accoutrements that are irritating to develop as scenery objects.”.
A dog is an animal in the Kitchen. “The big dog wags its tail at you.”. The description of it is “A big fluffy dog”.
A cat is an animal in the Kitchen. “The cat ignores you.” The description of it is “The cat hisses and spits. It doesn’t like you.”.[/code]
Here’s the output. I would expect L and Hues to hold the same. But no!
[code]Testgame
An Interactive Fiction by Ade McT
Release 1 / Serial number 160128 / Inform 7 build 6L38 (I6/v6.33 lib 6/12N) SD
Kitchen
Many accoutrements that are irritating to develop as scenery objects.
The big dog wags its tail at you.
The cat ignores you.
x cat
The cat hisses and spits. It doesn’t like you.
Blue and Green.
1 and 2.
Table of ColorfulThings
(row 1) | cat | 1 and 2 |
(row 2) | dog | |
[/code]
It’s translating the list in the table to a number rather than the value. I’ve tried many combinations of ‘{}’ or ‘–’ or ‘{“”}’ in the table itself, but no joy. What am I doing wrong?
Thank you!!
McT