Re: [IDEA] External argument parser

From: Andrey Fidrya (andrey@ALEX-UA.COM)
Date: 08/27/98


> an alternative that i think might be better is changing it to an argv and
> argc type arrangement..um..yeah..i guess that's all i have to say about
> that..

Why? :I
Here is my definition of ACMD:
#define ACMD(name)  \
   void name(struct char_data *ch, char *parg1, char *parg2, \
             struct char_data *ach1, struct char_data *ach2, \
             struct obj_data *aobj1, struct obj_data *aobj2, \
             char *argument, int cmd, int subcmd)
Example of command definition:
{ "give", POS_RESTING, do_give, 0, 0, A_MOBJ | W_INV,  A_CH | W_RM},
First argument: Multiple (or single) Object(s) in inventory, second argument -
character in same room.
If you want to keep original do_give, just describe both arguments as NULLs
and do_give will receive unmodified string from player.

Btw, I saw no replies from Jeremy and George... Can you write me please, what
do you think about this system?

  Andrey (andrey@alex-ua.com)
    aka Zmey // RMUD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST