SOLVED: Defining an Activity with Two Variable Inputs

EDIT: User error. Sorry for the blather.

For devious reasons having to do with an extension I’m updating, it may be useful for me to define what in most programming languages would be called a function, method, or procedure. I7 allows new activities to be defined, but Chapter 18 makes it appear that an activity can be passed only one variable. I need to define something along these lines (pseudo-code):

[code]Spell-learning is an activity on persons and things.

Carry out the spell-learning activity on (P - a person) and (SP - a thing):
What is the preferred syntax for doing this? Do I need to drop into I6?

If you just need a simple function, you can use a phrase.

To have (P - a person) learn the spell from (SP - a thing):
    do stuff.

Thanks – I figured that out soon after posting the query.

…but how do I invoke my new code? I have this:

To have (P - a person) spell-learn (SP - a thing): let L be the spells-learned of P; if SP is listed in L: [etc....]
It compiles fine. And then:

Instead of an actor researching frotz in the book: if frotz is learned: say "[The actor] [have] already learned the frotz spell from the book."; otherwise: have the actor spell-learn frotz; say "[The actor] [find] the page in the book describing the frotz spell, and [commit] the spell to memory."
But the compiler objects:

Per this thread, did you try “have the person asked spell-learn frotz”?

You also might want to be more specific and have a kind of thing called “spell” and make it so that only spells can be spell-learned.

No, changing it to “the person asked” produces the same error. In any event, we know that “the actor” has a meaning when that block of code is reached, because the Instead rule uses “the actor” in its first line.

Changing the function from “(SP - a thing)” to “(SP - a spell)” likewise has no effect. I still get the error.

Can anyone supply a bit of example code in which a two-variable function of this type works correctly when invoked from an Instead rule?

I also tried changing the code to “To cause (P - a person) to spell-learn (SP - a thing)” on the theory that perhaps “have” is an I7 keyword. That didn’t help. Same error as before.

Is this solved or not solved? The subject says solved, but there are still questions?

This compiles (and runs) without Problem messages:

[code]“Ancient Roman Times” by Mark J Musante

Rotunda is a room. “This is an exact replica of the place that Julius Caeser was murdered.”

A knife is in rotunda.

To have (P - a person) learn the (SP - a thing) spell:
say “P is [P] and SP is [SP].”

Instead of taking the knife:
have the actor learn the knife spell;
say “But that’s evidence!”[/code]

One thing that might help would be to paste the entire error message–usually after you get “That’s not a phrase I recognise” they give you a bunch of attempted construals of the phrase. Seeing exactly what those were might help us figure out what went wrong.

What went wrong was nothing to do with the code. It was to do with … well, I’m making major changes in Spellcasting. Specifically, I’m trying to set it up so that the player can ask someone else to cast a spell. For development purposes, I’ve created a new extension called Proxy Spellcasting. But the example code I loaded from Proxy Spellcasting still said, “Include Spellcasting by Jim Aikin.” Stupid error. So the example code was trying to run the original version of the extension, which didn’t have my new function in it.

In just a moment, I’ll have a far more interesting question…