[code]
The politician is a man. The description is "The politician is
impeccably groomed, and he's wearing an expensive suit." The
politician has a stored action called corruption.
The corruption of the politician is the action of taking the money.
[end code]
The compiler reacts to that as follows:
[output]
In Part SR2 - Variables and Rulebooks, Section SR2/7 - The Standard
Rulebooks:
Problem. You wrote 'The specific action-processing rulebook has a
truth state called action in world', but 'action in world' already has
a meaning, which this would clash with.
Problem. In 'The corruption of the politician is the action of taking
the money' you give a value of the corruption property as 'action of
taking the money', but I can only suppose that must be the name of a
room or thing, since it does not seem to be a stored action - which
this property calls for.
[end output]
If I comment out the line in which I'm attempting to define the stored
action, compilation proceeds as expected. Page 12.20 of Writing with
Inform would appear to suggest that I'm using the correct syntax --
but somehow my code is causing something in the Library not to
compile.
My first thought was, well, maybe a stored action can't be a property
of an object. So I made it global:
[code]
Corruption is a stored action that varies.
Corruption is the action of taking the money.
[end code]
This produces an even more mysterious compiler message. First we get
the same message as before, about the Standard Rules blowing up. Then
we get this:
[output]
Problem. The sentence 'Corruption is the action of taking the money'
tells me that 'Corruption', which is a stored action that varies,
should have value 'action of taking the money', but this is a stage
set and not a stored action.
[end output]
In the final sentence above, "this" evidently refers to the money,
which happens to be an object of the kind "stage set" (it's a kind I'm
using at several points in the game). So now the compiler is objecting
to the listing of a specific object in a stored action because the
object is of the wrong kind! Which certainly ought not to be possible.
But since this error message is preceded by one in which the Standard
Rules have blown up, quite likely the subsequent error message (shown)
is spurious.
What I ultimately want to do is give each of several NPCs a list or
table of stored actions, so that I can decide whether a given command
that the player gives the NPC is an allowed command, or one that
should be rejected with my own error message. Giving an NPC a single
stored action was a first step on that journey, and I've stubbed my
toe.
Can anyone shed light on what I'm doing wrong? Thanks.
--JA
I'll investigate further. Until then, as Gilda Radner used to say,
"Never mind."
--ja
I can get this error:
Problem. In 'The corruption of the politician is the action of taking
the money' you give a value of the corruption property as 'action of
taking the money', but I can only suppose that must be the name of a
room or thing, since it does not seem to be a stored action - which
this property calls for.
when I forget to define "money". As for the standard rules blowing
up, what extensions are you using?
-R