On Sat, 13 Jul 1996, John C. A. Bambenek, Esq. wrote:
> I was working with the autollot code on the snippets page, and put it
> in. I am getting this compiling error.
>
> fight.c: In function `damage':
> fight.c:756: parse error before `void'
> fight.c:757: warning: implicit declaration of function `do_get'
> make[1]: *** [fight.o] Error 1
> make[1]: Leaving directory `/home/jc/circle30bpl11/src'
> make: *** [all] Error 2
>
> Here is my code at this point.
>
> die(victim);
> if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOLOOT))
> ACMD(do_get);
> do_get(ch, "all corpse", 0, 0);
Well, if you look closely at your code, you might notice that you'll need
braces with that if statement. You are only prototyping ACMD(do_get) if
IS_NPC(victim) && !IS_NPC(ch) && ... And you are calling do_get even if
ch does not have autoloot on :P
Change it to:
if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOLOOT)) {
ACMD(do_get);
do_get(ch, "all corpse", 0, 0);
}
Have fun,
Eric Soderquist
This archive was generated by hypermail 2b30 : 12/07/00 PST