Re: [NEWBIE][CODE]Autosac

From: Greg Buxton (
Date: 12/23/02

From: "Jimmie Tryon" <zereth@EARTHLINK.NET>
> Thanks for all your help.  I've been tackling this for awhile now.  The
> problem I have now is it will not sacrifice the corpse, after the mob is
> dead.  I get the message 'What do you want to sacrifice'?
> *snip*
> ACMD(do_sac)
> {
>    struct obj_data *obj;
>    char arg[MAX_INPUT_LENGTH];
>    // note, I like to take care of no arg and wrong args up front, not
>    // at the end of a function, let's get the wrongness out of the way
>    if (!*arg)
>    {

Well, you've got arg declared now, but you still haven't assigned it
from 'argument'.

There doesn't seem to be a reason to have a seperate arg variable for this
You're only going to be passing a single item to it per call.  Just change
all of
your "arg" calls and replace them with "argument".  Also then you can just
get rid
of that "char arg[MAX_INPUT_LENGTH];" define as it won't be used.

- Greg
Shadows of Amber 5000

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT