Re: PK death List

From: Patrick Dughi (dughi@imaxx.net)
Date: 10/20/00


> but it bring ups two errors.
>
> STRUCTS.h
> struct pk_death{
>         char *killer;
>  char *vict;
>  int i;
>
> };
> struct pk_death death_list[30];
>
> FIGHT.C before die(vicitm)
>
> if (!IS_NPC(victim) && !IS_NPC(ch)){
>      for(i = 0; i < 29; i++)
>      strcpy(death_list[i + 1], death_list[i]);
>      death_list[0].killer = GET_NAME(ch);
>      death_list[0].vict = GET_NAME(victim);
> }
> I get two errors and three warning on this:
> warn declared formal parameter list different from definition
> error 'function' : incompatible types
> Twice warning C4024: 'strcpy' : different types for formal and actual
> parameter 1
> error C2115: 'function' : incompatible types
>
        Strcpy only works on character strings.  Not on structures.  Try
copying the individual elements of the character strings, instead of the
structures as a whole.

                                        PjD


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT