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
➜ Compiling the server
➜ stupid pointless errors......
stupid pointless errors......
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Fender
(10 posts) Bio
|
Date
| Sat 01 Nov 2003 03:04 PM (UTC) |
Message
| I'm compiling with msvc++ 6.0, and im getting these errors which make no sense whatsoever.
C:\smaug\dist\src\fight.c(3781) : error C2143: syntax error : missing ';' before 'type'
C:\smaug\dist\src\fight.c(3784) : error C2275: 'CHAR_DATA' : illegal use of this type as an expression
C:\smaug\dist\src\mud.h(101) : see declaration of 'CHAR_DATA'
C:\smaug\dist\src\fight.c(3786) : error C2065: 'argument' : undeclared identifier
C:\smaug\dist\src\fight.c(3786) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3786) : warning C4024: 'one_argument' : different types for formal and actual parameter 1
C:\smaug\dist\src\fight.c(3786) : error C2065: 'arg' : undeclared identifier
C:\smaug\dist\src\fight.c(3786) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3786) : warning C4024: 'one_argument' : different types for formal and actual parameter 2
C:\smaug\dist\src\fight.c(3788) : error C2109: subscript requires array or pointer type
C:\smaug\dist\src\fight.c(3794) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3794) : warning C4024: 'get_char_room' : different types for formal and actual parameter 2
C:\smaug\dist\src\fight.c(3864) : error C2143: syntax error : missing ';' before 'type'
C:\smaug\dist\src\fight.c(3872) : error C2143: syntax error : missing ';' before 'type'
C:\smaug\dist\src\fight.c(3875) : error C2143: syntax error : missing ';' before 'type'
C:\smaug\dist\src\fight.c(3876) : error C2275: 'CHAR_DATA' : illegal use of this type as an expression
C:\smaug\dist\src\mud.h(101) : see declaration of 'CHAR_DATA'
C:\smaug\dist\src\fight.c(3878) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3878) : warning C4024: 'one_argument' : different types for formal and actual parameter 1
C:\smaug\dist\src\fight.c(3878) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3878) : warning C4024: 'one_argument' : different types for formal and actual parameter 2
C:\smaug\dist\src\fight.c(3880) : error C2109: subscript requires array or pointer type
C:\smaug\dist\src\fight.c(3886) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3886) : warning C4024: 'get_char_room' : different types for formal and actual parameter 2
C:\smaug\dist\src\fight.c(3942) : error C2065: 'buf' : undeclared identifier
C:\smaug\dist\src\fight.c(3942) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3942) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
C:\smaug\dist\src\fight.c(3945) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3945) : warning C4024: 'do_wartalk' : different types for formal and actual parameter 2
C:\smaug\dist\src\fight.c(3947) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
C:\smaug\dist\src\fight.c(3947) : warning C4024: 'do_yell' : different types for formal and actual parameter 2
C:\smaug\dist\src\fight.c(3957) : error C2275: 'bool' : illegal use of this type as an expression
C:\smaug\dist\src\mud.h(89) : see declaration of 'bool'
C:\smaug\dist\src\fight.c(3957) : error C2146: syntax error : missing ';' before identifier 'in_arena'
C:\smaug\dist\src\fight.c(3957) : error C2143: syntax error : missing ')' before 'type'
C:\smaug\dist\src\fight.c(3957) : error C2198: 'in_arena' : too few actual parameters
C:\smaug\dist\src\fight.c(3957) : error C2059: syntax error : ')'
C:\smaug\dist\src\fight.c(3962) : warning C4098: 'new_dam_message' : 'void' function returning a value
C:\smaug\dist\src\fight.c(3964) : warning C4098: 'new_dam_message' : 'void' function returning a value
C:\smaug\dist\src\fight.c(3966) : warning C4098: 'new_dam_message' : 'void' function returning a value
C:\smaug\dist\src\fight.c(3968) : warning C4098: 'new_dam_message' : 'void' function returning a value
C:\smaug\dist\src\fight.c(3971) : error C2061: syntax error : identifier 'check_illegal_pk'
C:\smaug\dist\src\fight.c(3971) : error C2059: syntax error : ';'
C:\smaug\dist\src\fight.c(3971) : error C2059: syntax error : 'type'
just in fight.c alone
polymorph.c has a ton of errors, special.c has lots of warnings, and tables.c has over 500 warnings....whats going on?
| Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Sat 01 Nov 2003 10:27 PM (UTC) |
Message
| Well, there are a few things here...
For one, SMAUG code is quite messy in that it does not follow the strict ANSI C guidelines. It does its casts quite messily, and that's why you're getting all those warnings and maybe even errors.
For instance, I recently ported a MUD from C to C++, and it compiled fine under C and generated about 400 errors under C++, due to a stricter compiler. It's quite possible that MSVC++ is using a stricter version of the language standards (which actually is a good thing, since it helps avoid mistakes.)
The other thing you may want to look at is that it might not be figuring out that you're compiling in C, not C++, so it may be seeing C++ keywords (e.g. class, new, etc.) and getting confused. It's enough to just change class to Class, or something to that effect. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sun 02 Nov 2003 08:52 PM (UTC) |
Message
| Sounds like it is missing a definition. Fix the first error and the others may go away. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #3 on Tue 04 Nov 2003 07:33 PM (UTC) |
Message
| Could you post 20ish lines of your fight.c file starting at line 3770. What it sounds like you have is a missing ; at the end of a line or function at line 3780 but the fact that the error registers at 3781 doesn't quite guarantee the error is at the line directly preceeding. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.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.
14,027 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top