compile error with snippet

Posted by Toon on Tue 01 Aug 2006 09:15 PM — 3 posts, 16,924 views.

#0
Im am trying to add a snippet with some spells, which also has a fight affect to it. I followed the snippet exactly how it explains to install it, and I get this error. I have defined what ff, gg, and hh are in merc.h. The spells were added to const.c, and the rest went into magic.c and magic.h as they were supposed to. What might cause it to think its undefined?


fight.c: In function 'damage':
fight.c:1008: error: 'ff' undeclared (first use in this function)
fight.c:1008: error: (Each undeclared identifier is reported only once
fight.c:1008: error: for each function it appears in.)
fight.c:1010: error: 'gg' undeclared (first use in this function)
fight.c:1017: error: 'hh' undeclared (first use in this function)
fight.c: In function 'check_force_shield':
fight.c:4157: error: 'ff' undeclared (first use in this function)
fight.c: In function 'check_static_shield':
fight.c:4184: error: 'gg' undeclared (first use in this function)
fight.c: In function 'check_flame_shield':
fight.c:4226: error: 'hh' undeclared (first use in this function)
make: *** [obj/fight.o] Error 1


Thanks
USA #1
When you say that you defined what ff, gg and hh are, how did you do that?

It might help if you showed us the snippet (e.g. give a link to it) so that we can follow along and see where things might have gone wrong.
USA #2
At the top of fight.c do you have a line that reads:
#include "merc.h"
If not, perhaps you should add that and try it again?