Re: PK death List

From: Brian Juba (adder220@HOTMAIL.COM)
Date: 10/19/00


Using some code i got from Blaze and editing it a little i now have this
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

Any help would be greatly appreciated, im pretty sure its an easy error to
spot but im obviously STILL did not read up on C. I also need help on how to
display the array inside a command.


Brian


     +------------------------------------------------------------+
     | 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