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
➜ A whole slew of errors....
A whole slew of errors....
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Fri 11 Jul 2003 06:11 AM (UTC) |
Message
| I was converting the alias code found at alsherok by Samson for my SWR codebase, and after I installed I got these errors:
mud.h:3481: parse error before `*'
mud.h:3481: warning: type defaults to `int' in declaration of `fpReserve'
mud.h:3481: warning: data definition has no type or storage class
mud.h:3482: parse error before `*'
mud.h:3482: warning: type defaults to `int' in declaration of `fpLOG'
mud.h:3482: warning: data definition has no type or storage class
mud.h:4494: parse error before `*'
mud.h:4495: parse error before `*'
mud.h:4496: parse error before `*'
mud.h:4497: parse error before `*'
mud.h:4498: parse error before `*'
mud.h:4499: parse error before `*'
mud.h:4500: parse error before `*'
mud.h:4837: parse error before `FILE'
mud.h:4839: parse error before `FILE'
alias.c: In function `do_alias':
alias.c:99: warning: implicit declaration of function `perror'
alias.c:99: warning: implicit declaration of function `fprintf'
alias.c:99: `stderr' undeclared (first use in this function)
alias.c:99: (Each undeclared identifier is reported only once
alias.c:99: for each function it appears in.)
alias.c: In function `check_alias':
alias.c:143: warning: implicit declaration of function `sprintf'
Now, to what I've been looking at, it appears every error is somehow linkned to FILE in mud.h. However, I didn't mess with anything of that nature at all. Just after I installed this code did this pop up, so something must not be right since the parse errors didn't show up before. I know without the code you can't help all to much, but do you think you could point me in the right direction? |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 11 Jul 2003 09:44 AM (UTC) |
Message
| What is in mud.h at line 3481? Sounds like you have corrupted it somehow, or maybe omitted the includes necessary for FILE. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #2 on Fri 11 Jul 2003 06:27 PM (UTC) |
Message
| 3481:extern FILE * fpReserve;
3482:extern FILE * fpLOG;
4494:char fread_letter args( ( FILE *fp ) );
4495:int fread_number args( ( FILE *fp ) );
4496:char * fread_string args( ( FILE *fp ) );
4497:char * fread_string_nohash args( ( FILE *fp ) );
4498:void fread_to_eol args( ( FILE *fp ) );
4499:char * fread_word args( ( FILE *fp ) );
4500:char * fread_line args( ( FILE *fp ) );
4837:void fwrite_obj args( ( CHAR_DATA *ch, OBJ_DATA *obj, FILE *fp,
4838: int iNest, sh_int os_type ) );
4839:void fread_obj args( ( CHAR_DATA *ch, FILE *fp, sh_int os_type ) );
Don't know whats wrong with it, it all looks alright to me, it has only messed up since I tried adding the aliases. |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Fri 11 Jul 2003 10:02 PM (UTC) |
Message
| Did the code you added have a #define FILE <something> ? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #4 on Sat 12 Jul 2003 08:11 AM (UTC) |
Message
| Nope. Anything else you can think of that would cause it? |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Dave
Australia (93 posts) Bio
|
Date
| Reply #5 on Sat 12 Jul 2003 04:00 PM (UTC) |
Message
| What #include's does alias.c have? FILE is defined in stdio.h, make sure alias.c includes that. | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #6 on Sat 12 Jul 2003 09:26 PM (UTC) |
Message
| Heh, simple fix. :) Thanks a lot, that was the problem. |
~Nick Cash
http://www.nick-cash.com | 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.
18,711 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top