fight.c:1619: error: `clan_gain_vamp' undeclared (first use in this function) fight.c:3918: error: `clan_gain_vamp' undeclared (first use in this function) fight.c:3996: error: `clan_gain_ww' undeclared (first use in this function)
why? I have made the clan_gain_* global in merc.h and it's included in fight.c
struct clan_gain_type
{
int attacks;
int dodge;
int reduct;
int dam;
int hit;
};
extern const struct clan_gain_type clain_gain_ww [];
extern const struct clan_gain_type clain_gain_vamp [];
extern const struct clan_gain_type clain_gain_kfc [];
extern const struct clan_gain_type clain_gain_angel [];
const.c :
const struct clan_gain_type clan_gain_ww [] =
{
/* ( attacks, dodge, reduction, dam, hit) */
{ 2 ,0 ,0.040 ,10 ,10 }, /* AGE 0 */
{ 4 ,0 ,0.080 ,20 ,20 }, /* AGE 1 */
{ 6 ,0 ,0.120 ,30 ,30 }, /* AGE 2 */
{ 8 ,0 ,0.160 ,40 ,40 }, /* AGE 3 */
{ 10 ,0 ,0.200 ,50 ,50 }, /* AGE 4 */
};
const struct clan_gain_type clan_gain_vamp [] =
{
/* ( attacks, dodge, reduction, dam, hit) */
{ 2 ,2 ,0.040 ,10 ,10 }, /* AGE 0 */
{ 4 ,4 ,0.080 ,20 ,20 }, /* AGE 1 */
{ 6 ,6 ,0.120 ,30 ,30 }, /* AGE 2 */
{ 8 ,8 ,0.160 ,40 ,40 }, /* AGE 3 */
{ 10 ,10 ,0.200 ,50 ,50 }, /* AGE 4 */
};
const struct clan_gain_type clan_gain_kfc [] =
{
/* ( attacks, dodge, reduction, dam, hit) */
{ 2 ,0 ,0.040 ,10 ,10 }, /* AGE 0 */
{ 4 ,0 ,0.080 ,20 ,20 }, /* AGE 1 */
{ 6 ,0 ,0.120 ,30 ,30 }, /* AGE 2 */
{ 8 ,0 ,0.160 ,40 ,40 }, /* AGE 3 */
{ 10 ,0 ,0.200 ,50 ,50 }, /* AGE 4 */
};
const struct clan_gain_type clan_gain_angel [] =
{
/* ( attacks, dodge, reduction, dam, hit) */
{ 2 ,0 ,0.040 ,10 ,10 }, /* AGE 0 */
{ 4 ,0 ,0.080 ,20 ,20 }, /* AGE 1 */
{ 6 ,0 ,0.120 ,30 ,30 }, /* AGE 2 */
{ 8 ,0 ,0.160 ,40 ,40 }, /* AGE 3 */
{ 10 ,0 ,0.200 ,50 ,50 }, /* AGE 4 */
};
when compiling:
fight.c:1619: error: `clan_gain_vamp' undeclared (first use in this function)
fight.c:3918: error: `clan_gain_vamp' undeclared (first use in this function)
fight.c:3996: error: `clan_gain_ww' undeclared (first use in this function)
why? I have made the clan_gain_* global in merc.h and it's included in fight.c