Problem using extension Consolidate Multiple Actions

I’m getting an error when compiling the Clutter example for John Clemens Consolidate Multiple Actions extension. Being new at inform 7 it’s probably some thing simple.

Here’s the error message.

[i]Problem. In the sentence ‘say “[The actor] picks up [consolidated objects].”’ , I was expecting to read an object, but instead found some text that I couldn’t understand - ‘actor’.

I was trying to match one of these phrases:

  1. say “[The actor - object]”
  2. say “[the actor - object]”
  3. say “actor - text”
  4. say “[actor - number]”
  5. say “[actor - unicode character]”
  6. say “[actor - sayable value]”
  7. say “” picks up " - text"
  8. say “[consolidated objects]”
  9. say “consolidated objects - text”
  10. say “[consolidated objects - number]”
  11. say “[consolidated objects - unicode character]”
  12. say “[consolidated objects - sayable value]”
  13. say “”." - text"
    This was what I found out:
    actor = something unrecognised
    consolidated objects = something unrecognised[/i]

Appreciate any insight to the cause of the problem.

Thanks

Jacques Leclerc

What does your rule with the offending line look like?

The standard rules document seems to imply that “actor” is a variable local to an ongoing action, so if you use it in a rule that has nothing to do with actions, it may not be understood.
(Though experiment proves that it can actually be used even in a When play begins rule!)

The offending rule is in the extenstion.

This is the line that is highlighted.
Last for reporting consolidated actions rule when asking someone to try taking (this is the standard consolidated report taking by others rule): say “[The actor] picks up [consolidated objects].”

The error occurs when trying to compile the sample supplied with the extension. The sample contains the line Include Consolidated Multiple Actions by John Clemens. .

When attempting to install the extension into the IDE it says that it is already included. If iI remove the Include statement from the sample the error does not occur. I’m assuming at this point that any extensions that have been built in do not need the include statement for that extension within the source. Is this a correct assumption?

Jacques Leclerc

Aha! It’s a line in the extension itself that triggers the error …

This seems to fix it (though of course it’s anything but thoroughly tested):

Open the extension (from the file menu in the IDE).
Find the lines

[code]Section 3 -Reporting consolidated actions

Reporting consolidated actions is an activity.
[/code]
Add the variable to the activity and a rule to set it:

[code]Section 3 -Reporting consolidated actions

Reporting consolidated actions is an activity.
Reporting consolidated actions activity has a person called the actor.
Before reporting consolidated actions: now the actor is the person asked.[/code]
Beware of bugs.

EDIT:
Come to think of it, you need not edit the very extension. You can simply add those two lines to your own source text.

Reporting consolidated actions activity has a person called the actor. Before reporting consolidated actions: now the actor is the person asked.

The actor is a variable that belongs to the action-processing rules. It can’t be used outside of those so Inform doesn’t recognize it. But I think the extension means to use the I6 global variable “actor”, which is called “the person asked” in I7. Perhaps the extension was written for an older version of Inform?

It seems likely, since no one has heard from John Clemens lately.

I have already updated and submitted his “Conditional Backdrops” extension under my name. If there are no objections, I volunteer to send an update for this extension as well.

I fixed it by replacing every instance of “the actor” with “the person asked.” As this is an extremely minor change, I propose submitting it under John Clemens’ name. How does that sound?

I’d appreciate it. Having come from an object oriented background, there are enough challenges learning Inform 7 without having to also debug extensions.

Appreciate your effort.

Thanks

It sounds sensible. (I’m sure there are all kinds of principled objections to it – it still sounds … well, sensible.)

After you have installed an extension so that it shows up in the IDE, you still need to include it explicitly in each game that wants to make use of it. This is true of all extensions (except the Standard Rules), even those that are known as “built-in”, i.e. those that come pre-installed with the IDE (like Plurality by Emily Short).