Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ ROM ➜ Running the server ➜ compile error with snippet

compile error with snippet

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Toon   (1 post)  Bio
Date Tue 01 Aug 2006 09:15 PM (UTC)
Message
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
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Tue 01 Aug 2006 09:32 PM (UTC)
Message
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.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #2 on Sat 05 Aug 2006 03:53 AM (UTC)
Message
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?

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


16,184 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.