Re: [newbie] Arguments.

From: Rasdan (rasdan@PEAK.ORG)
Date: 07/15/97


On Tue, 15 Jul 1997, Heartless wrote:

>                         'retreat n'
>                 (which would mean retreat north), what is the argument
> 'n' passed as? I was kinda hoping it was something simple like 'cmd' or
> 'argument' but neither of those seem to have worked.... Can anyone help
> me out?
Briefly,

ACMD(do_retreat)
{
  int dir = 0;

  one_argument(argument, arg);

  if (is_abbrev(arg, "north"))
    dir = 0;
  else if (is_abbrev(arg, "south"))
   .
   . /* Put rest of direction stuff here */
   .
  else {
    send_to_char("That is not a valid direction to retreat in\r\n", ch);
    return;
  }

/* Do checks to see if EXIT(ch, dir) exists, then move them there */

}

Hope this helps,

Rasdan


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



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