I’m trying to set up a chemical puzzle, I want a bunch of chemicals and I figured it would be more readable to set them up using a table. The “proper” way doesn’t work right now according to Defining things with tables results in adding properties at the room level - #4 by Monsieur.HUT * , but filling out item properties from the table should work?
Except the below snippet gives me a " Run-Time Problem Attempt to look up a non-existent entry in table (P23)":
"Test" by Hellzon
A thing has some text called smell.
A thing has a text called taste.
A thing can be poisonous. A thing is usually not poisonous.
The Chemical lab is a room.
A chemical bottle is a kind of thing.
A chemical bottle has a text called the hue.
A chemical bottle has a text called the consistency.
A chemical bottle has a number called the CID.
A chemical bottle is usually not poisonous.
The description of a chemical bottle is usually "[A noun] half-full of [hue] [consistency].".
A poison bottle is a kind of chemical bottle. A poison bottle is usually poisonous.
Report tasting a chemical bottle:
Say "The contents of [the noun] [taste] [taste of the noun]." instead.
A tall round bottle is a chemical bottle in the Chemical Lab. The CID is 101.
A short conical bottle is a poison bottle in the Chemical Lab. The CID is 201.
When play begins:
repeat with X running through chemical bottles:
If there is a Chemical-number of (the CID of X) in the Table of Chemicals: [for testing]
choose the row with Chemical-number of the CID of X in Table of Chemicals;
now the hue of X is "[Colour entry]";
now the consistency of X is "[Formulation entry]";
now the smell of X is "[Odour entry]";
now the taste of X is "[Mouthfeel entry]".
Table of Chemicals
Chemical-number Colour Formulation Odour Mouthfeel
101 "white" "powder" "a hint of cinnamon" "sweet"
201 "orange" "granules" -- "salty"
The Index tells me that the two bottles are indeed getting the “CID” properties correctly, but nothing else is being assigned. Presumably I’m doing something wrong with the choosing of rows or setting variables?
*) Tested that one. Yeah, everything in the game world got colour, consistency, smell and taste variables.