I7 - kinds of value in a to phrase

I have defined a kind of value known as “valuation”, and I have stated that things have a valuation. This works fine, of course. But when I try to invoke this kind of value in a to-phrase, like this:

To place (i - a number) of (worth - a valuation) things in (coffer - a thing): let n be the number of off-stage worth things; let m be i; if m is greater than n, now m is n; while m is greater than 0: let item be a random off-stage worth thing; move item to coffer; if generation info is true, say "* Putting [item] in [coffer]."; decrease m by 1.

Inform throws errors for the second and sixth line, as it doesn’t understand what an “off-stage worth thing” is. (Or what a “worth thing” is, for that matter; the problem does not lie in adding the off-stage property.) Why is it failing to understand me, and how do I get Inform to do what I want?

Look at chapter 14.7. You have to define a verb for the property. (E.g., “…the number of off-stage things valuing worth”.)

Thanks, that works. :slight_smile:

I don’t really understand why I would need to create a verb, though. Inform 7 understand “minor thing”, “major thing”, “epic thing” and so on perfectly (where “minor”, “major” and “epic” are the valuations). So why doesn’t it understand “worth thing” when “worth” is a variable holding the valuation “minor”? There’s nothing in section 14.7 which seems relevant to this.

I don’t know.

I can’t test it right now, and I may be totally off the mark, but I would have expected

To place (i - a number) of (worth - an enumerated value) things in (coffer - a thing)

to work.