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 ➜ SMAUG ➜ SMAUG coding ➜ Adding finger to smaugfuss

Adding finger to smaugfuss

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


Posted by Metsuro   USA  (389 posts)  Bio
Date Wed 12 Jul 2006 04:28 AM (UTC)
Message
While adding finger to smaugfuss I get stuff like this...

In file included from mud.h:250,
                 from finger.c:35:
hometowns.h:92: error: syntax error before '*' token
hometowns.h:92: warning: function declaration isn't a prototype
In file included from mud.h:355,
                 from finger.c:35:
imc.h:421: error: syntax error before "FILE"
imc.h:421: warning: function declaration isn't a prototype
imc.h:422: error: syntax error before "FILE"
imc.h:422: warning: function declaration isn't a prototype
In file included from finger.c:35:
mud.h:3379: error: syntax error before '*' token
mud.h:3379: warning: type defaults to `int' in declaration of `fpArea'
mud.h:3379: warning: data definition has no type or storage class
mud.h:4392: error: syntax error before '*' token
mud.h:4392: warning: function declaration isn't a prototype
mud.h:4393: error: syntax error before '*' token
mud.h:4393: warning: function declaration isn't a prototype
mud.h:4394: error: syntax error before '*' token
mud.h:4394: warning: function declaration isn't a prototype
mud.h:4395: error: syntax error before "FILE"
mud.h:4395: warning: function declaration isn't a prototype
mud.h:4397: error: syntax error before '*' token
mud.h:4397: warning: function declaration isn't a prototype
mud.h:4398: error: syntax error before '*' token
mud.h:4398: warning: function declaration isn't a prototype
mud.h:4399: error: syntax error before '*' token
mud.h:4399: warning: function declaration isn't a prototype
mud.h:4400: error: syntax error before '*' token
mud.h:4400: warning: function declaration isn't a prototype
mud.h:4401: error: syntax error before '*' token
mud.h:4401: warning: function declaration isn't a prototype
mud.h:4402: error: syntax error before '*' token
mud.h:4402: warning: function declaration isn't a prototype
mud.h:4533: error: syntax error before "FILE"
mud.h:4533: warning: function declaration isn't a prototype
mud.h:4534: error: syntax error before "FILE"
mud.h:4534: warning: function declaration isn't a prototype
mud.h:4552: error: syntax error before '*' token
mud.h:4552: warning: function declaration isn't a prototype
mud.h:4554: error: syntax error before '*' token
mud.h:4554: warning: function declaration isn't a prototype
mud.h:4584: error: syntax error before '*' token
mud.h:4584: warning: function declaration isn't a prototype
mud.h:4752: error: syntax error before "FILE"
mud.h:4752: warning: function declaration isn't a prototype
mud.h:4753: error: syntax error before "FILE"
mud.h:4753: warning: function declaration isn't a prototype
mud.h:4758: error: syntax error before '*' token
mud.h:4758: warning: function declaration isn't a prototype
mud.h:4759: error: syntax error before '*' token
mud.h:4759: warning: function declaration isn't a prototype
finger.c:99: error: syntax error before "FILE"
finger.c:100: warning: function declaration isn't a prototype
finger.c: In function `fread_info':
finger.c:106: warning: implicit declaration of function `feof'
finger.c:106: error: `fp' undeclared (first use in this function)
finger.c:106: error: (Each undeclared identifier is reported only once
finger.c:106: error: for each function it appears in.)
finger.c:117: error: `wiz' undeclared (first use in this function)
finger.c: In function `build_wizinfo':
finger.c:140: error: `FILE' undeclared (first use in this function)
finger.c:140: error: `fp' undeclared (first use in this function)
finger.c:162: warning: implicit declaration of function `snprintf'
<internal>:0: warning: redundant redeclaration of 'snprintf'
finger.c:163: warning: implicit declaration of function `fopen'
finger.c:166: warning: implicit declaration of function `perror'
finger.c:166: warning: implicit declaration of function `fprintf'
<internal>:0: warning: redundant redeclaration of 'fprintf'
finger.c:166: error: `stderr' undeclared (first use in this function)
finger.c:169: warning: implicit declaration of function `fclose'
finger.c: In function `do_wizinfo':
<internal>:0: warning: redundant redeclaration of 'snprintf'
finger.c: In function `do_finger':
<internal>:0: warning: redundant redeclaration of 'snprintf'
finger.c:166: warning: redundant redeclaration of 'perror'
finger.c:166: warning: previous implicit declaration of 'perror' was here
<internal>:0: warning: redundant redeclaration of 'fprintf'
finger.c:277: error: `stderr' undeclared (first use in this function)
finger.c:166: warning: redundant redeclaration of 'perror'
finger.c:166: warning: previous implicit declaration of 'perror' was here
<internal>:0: warning: redundant redeclaration of 'fprintf'
finger.c: In function `do_homepage':
<internal>:0: warning: redundant redeclaration of 'snprintf'
make[1]: *** [o/finger.o] Error 1
make: *** [all] Error 2


and I'm not exactly sure why this happens? I've also got the same thing happening when I tried to add the purning thing from afkmud.org but this is my second try at adding finger heh

Everything turns around in the end
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Wed 12 Jul 2006 04:42 AM (UTC)
Message
Not being able to see the lines this refers to makes it about as easy to debug as it is to fill a barrel with holes. :) One thing you could try: put the lime in the coconut...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #2 on Wed 12 Jul 2006 04:49 AM (UTC)
Message
Well seeing as I dont get that error unless I'm including a file, because the same issues arrise when I add the purning system as well. So I'm thinking it has something to do with the finger.c or finger.h. Most of the lines are like HOMEDATA *hometowns, or CHAR_DATA *ch

Everything turns around in the end
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #3 on Wed 12 Jul 2006 05:04 AM (UTC)

Amended on Wed 12 Jul 2006 05:12 AM (UTC) by Metsuro

Message
Alright well to me, it seems its any reference to FILE. example.

line 92 from hometowns.h

HOMETOWN_DATA *fread_hometown args((FILE *fp));

and then 421 and 422 from imc.h

bool imc_loadchar( CHAR_DATA * ch, FILE * fp, const char *word );
void imc_savechar( CHAR_DATA * ch, FILE * fp );


but I could be very wrong, however I do not know because I am just taking wild stabs at it.

Everything turns around in the end
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #4 on Wed 12 Jul 2006 08:18 AM (UTC)
Message
After toying around some, I got it to work, just had to include some files that weren't included already.

Everything turns around in the end
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #5 on Wed 12 Jul 2006 07:57 PM (UTC)
Message
I don't suppose that you'd like to help others in the future avoid this issue by posting what extra includes resolved the issue, especially if they're not listed in the snippet...

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

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #6 on Wed 12 Jul 2006 08:06 PM (UTC)
Message
Well I compared my mud.h to one on my wotc codebase. And noticed that the mud.h had...

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>


where as the mud.h I had only had stdio.h and limits.h i believe. so I added the extras and it seemed to work fine.

Everything turns around in the end
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #7 on Thu 13 Jul 2006 01:41 AM (UTC)
Message
Actually, that makes sense.. thanks for sharing. :)

-=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.


27,125 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.