MOO-cows Mailing List Archive
Re: Arguments -- what does "any" mean?
On Mon, 11 Dec 1995, Kirrily Robert wrote:
> I'm horribly confused by how arguments were parsed... I was under the
> impression that 'any' meant 'any or none', even where prepositions
> were meant. But now I've come up across a problem that's got me
That impression was the correct one.
> The radio has a verb on it called radio:"broadcast bc" which is
> intended to take a line of text and broadcast it to the channel like
> bc wizchat this is a test
> [WIZCHAT:Skud] this is a test
For this syntax the verb must either exist on you, the room you are in,
or be activated by a :huh verb on the room you are in.
> Now, I had put this args on teh verb as "this none any" meaning that I
> didn't want it to have a preposition. But ti didn't work. The old "I
> dont understand" message -- it didn't even parse it.
That cannot parse. The server uses the preposition to discover the dobjstr
and the iobjstr. With no preposition, there cannot be an iobjstr. So if
any none none
The only reasonable value for the indirect object (iobj/iobjstr) is none.
any none any, any none this, etc, are impossible.
> So I told it teh args could be "this any any" and it still died.
> However, if I used
> bc wizchat is testing or
> bc wizchat at testing or
> bc wizchat into testing
> It would work! It seemed to only accept actual prepositions, not no
> preposition at all.
That is correct. For example, bc wizchat Merry Christmas everyone.
The parser takes the first word as the verb. bc. It then looks for a
preposition, and not finding one, it takes dobjstr to be 'wizchat Merry
Naturally, it doesn't find an object called 'wizchat Merry Christmas
everyone.', so the only places it searches for the verb (bc), is on the
player in question, and the players current location.
> Now, why is it that neither of these two arg types (this none any and
> this any any) seem to work? Is there a way of getting it to work
> short of turning the radio into a feature object, or putting the verb
> somewhere on a player class? Enquiring minds want to know!
Either a feature object (actually a 'here:huh' verb), or on the player
itself is the only solution here, unless you get sneaky in #0:do_command()
Subject Index |