MOO-cows Mailing List Archive
Re: Wierd Verb Stuff - Need Help!
Chris Jones wrote:
> Hi, everyone. I'm trying to setup a verb on an object which
> works like this:
> [Verb code may not work; making this off the top of my head]
> cmd = "foo";
> [Could this be setup so that the second line will execute player:foo(),
> and then if cmd is changed (say to "bar"), that it would execute
The form for any verb call is <object>:(<string>)(<arglist>)
The <object>:verb() form is actually just a shorthand way of saying
cmd = "foo";
would call player:foo().
That's why, in order to call a verb whose name includes a MOO-code keyword, like
@join, you have to write player:("@join")().
Subject Index |