Re: some coding help

From: Romulus.. Imp of Phoenix Mud (
Date: 03/06/96

On Wed, 6 Mar 1996, Robert Clark wrote:

> I have basically two questions:
> How do I call do_x functions?

If you want to call an ACMD function such as do_get
I suggest looking at the ACMD macro to determine the variables/values
that you need to pass to that function for its proper operation.
>From interpreter.h:

#define ACMD(c)  \
   void (c)(struct char_data *ch,char *argument,int cmd,int subcmd)   

Then just call the function in your code and pass it the correct values.

Example from my fight.c:

     if(PRF_FLAGGED(killer, PRF_AUTOLOOT))  
        do_get(killer, "all corpse",0,SCMD_LOOT);

Don't forget to prototype the function you want to call at the top
of the function you want to call it from.

This works for any other non-ACMD funtion also, You just have to include
the correct variables in the call that that function requires.

> Is there an easy routine to get input (non-interpretted) from the user, I've
> looked
> at get_from_q routine, but it looks very bulky.

What type of information and at what point in the game/login do you want
to get this information? A little more info is needed.

Romulus...Head Imp of Phoenix Mud ( 4000)

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