Re: Spec-Proc / Renting Question

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 08/07/97


On Thu, 7 Aug 1997, <Pure Krome> wrote:

>    I'm adding a new check for renting at a receptionist. Along with
>rent and offer i'm having a pay command. I'm not sure how to check to
>see what their argument is, there.
>
>i thought using two_arguments(arg, buf, buf2); might work, but if i
>type in pay 10, then buf is pay (of course) but buf2 is "" which is
>nothing. I thought it would be 10 or whatever preceeded pay.

The name of the function is not passed in the argument variable so we do a
different method of figuring out what they typed.

  { "drink"    , POS_RESTING , do_drink    , 0, SCMD_DRINK },
  { "sip"      , POS_RESTING , do_drink    , 0, SCMD_SIP },
(Same function)

Soo, make some #defines in interpreter.h
#define SCMD_PAY        0
#define SCMD_RENT       1

And change the last number in "rent" to SCMD_RENT and the last number in
pay to SCMD_PAY on the command list.

if (subcmd == SCMD_PAY)
  ...blah
else if (subcmd == SCMD_RENT)

--
greerga@muohio.edu me@null.net | Genius may have its limitations, but stupidity
http://www.muohio.edu/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | 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/08/00 PST