[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  stupid pointless errors......
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

stupid pointless errors......

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Fender   (10 posts)  [Biography] bio
Date Sat 01 Nov 2003 03:04 PM (UTC)  quote  ]
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?

[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Reply #1 on Sat 01 Nov 2003 10:27 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (19,431 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 02 Nov 2003 08:52 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Meerclar   USA  (584 posts)  [Biography] bio
Date Reply #3 on Tue 04 Nov 2003 07:33 PM (UTC)  quote  ]
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
[Go to top] 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.


2,816 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]