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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  errors

errors

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


Posted by Gorock   (149 posts)  [Biography] bio
Date Sat 29 Oct 2005 10:11 PM (UTC)
Message
i am trying to add a slay command to personalize slays here are the errors im getting

make -s smaug
Compiling o/slay.o....
In file included from mud.h:346,
from slay.c:42:
imc.h:408: parse error before "FILE"
imc.h:409: parse error before "FILE"
In file included from slay.c:42:
mud.h:710: parse error before "SUB_TIMER_DO_ABORT"
mud.h:3295: parse error before '*' token
mud.h:3295: warning: type defaults to `int' in declaration of `fpArea'
mud.h:3295: warning: data definition has no type or storage class
mud.h:4312: parse error before '*' token
mud.h:4313: parse error before '*' token
mud.h:4314: parse error before '*' token
mud.h:4315: parse error before "FILE"
mud.h:4317: parse error before '*' token
mud.h:4318: parse error before '*' token
mud.h:4319: parse error before '*' token
mud.h:4320: parse error before '*' token
mud.h:4321: parse error before '*' token
mud.h:4322: parse error before '*' token
mud.h:4451: parse error before "FILE"
mud.h:4452: parse error before "FILE"
mud.h:4470: parse error before '*' token
mud.h:4472: parse error before '*' token
mud.h:4502: parse error before '*' token
mud.h:4669: parse error before "FILE"
mud.h:4670: parse error before "FILE"
mud.h:4675: parse error before '*' token
mud.h:4676: parse error before '*' token
slay.c:70: parse error before "FILE"
slay.c: In function `fread_slay':
slay.c:77: warning: implicit declaration of function `feof'
slay.c:77: `fp' undeclared (first use in this function)
slay.c:77: (Each undeclared identifier is reported only once
slay.c:77: for each function it appears in.)
slay.c:88: `slay' undeclared (first use in this function)
slay.c: In function `load_slays':
slay.c:128: `FILE' undeclared (first use in this function)
slay.c:128: `fp' undeclared (first use in this function)
slay.c:134: warning: implicit declaration of function `snprintf'
slay.c:136: warning: implicit declaration of function `fopen'
slay.c:163: warning: implicit declaration of function `fclose'
slay.c:167: warning: implicit declaration of function `perror'
slay.c:167: warning: implicit declaration of function `fprintf'
slay.c:167: `stderr' undeclared (first use in this function)
slay.c:181: warning: redundant redeclaration of `fclose' in same scope
slay.c:163: warning: previous declaration of `fclose'
slay.c: In function `save_slays':
slay.c:191: `FILE' undeclared (first use in this function)
slay.c:191: `fp' undeclared (first use in this function)
slay.c: In function `do_makeslay':
slay.c:345: `stderr' undeclared (first use in this function)
make[1]: *** [o/slay.o] Error 1
make: *** [all] Error 2


some of these files i did not even touch so im assuming its just one thing wrong and when fixing that it will fix it all any help thanks
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #1 on Sat 29 Oct 2005 10:13 PM (UTC)
Message
Why not just replace the current slay function?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Gorock   (149 posts)  [Biography] bio
Date Reply #2 on Sat 29 Oct 2005 10:22 PM (UTC)
Message
1. To install this code:

Copy slay.c and slay.h into your code directory, then add slay.o
and slay.c to the appropriate locations in your Makefile.

2. In mud.h:

Find the following code:

#define LEVEL_HIGOD LEVEL_GOD

and below it add: #include "slay.h"

Find the Character Substates section:
Add the following after SUB_PROJ_DESC:

SUB_SLAYCMSG, SUB_SLAYVMSG, SUB_SLAYRMSG

3. Find the do_slay function in fight.c and comment it out, or rename
it as do_oldslay. If you choose to rename it, be sure and update your
tables.c file appropriately.

4. In db.c, above the following:

log_string( "Loading corpses" );
load_corpses( );

Add this:

log_string( "Loading slay table" ); /* Online slay table - Samson 8-3-98 */
load_slays( );

5. Add entries in tables.c for: do_makeslay, do_setslay, do_showslay,
and do_destroyslay.

6. Place the included slay.dat file in your dist/system directory.

7. Make clean, and then recompile.

8. After you reboot, add the following commands using cedit, or by
editing commands.dat:

setslay, showslay, makeslay, destroyslay

9. Add the included help text in Slay.help to your help.are file.

thats the instructions i changed slay to void do_oldslay that way it can still be used but there is now makeslay destroyslay and other commands as well play slay.c file has more then just commands so i dont think i can just take void do_makeslay and the rest and copy them over to skills.c or anything. thanks for replying
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #3 on Sat 29 Oct 2005 10:43 PM (UTC)
Message
Add:

#include <stdio.h>

To the top of the file above where the include for mud.h is.
[Go to top] top

Posted by Gorock   (149 posts)  [Biography] bio
Date Reply #4 on Sat 29 Oct 2005 10:54 PM (UTC)
Message
ok that seemed to help out alot but i still get these errors

Compiling o/imc.o....
In file included from mud.h:347,
from imc.c:48:
slay.h:25: redefinition of `SLAY_DATA'
slay.h:25: `SLAY_DATA' previously declared here
slay.h:27: warning: redundant redeclaration of `first_slay' in same scope
slay.h:27: warning: previous declaration of `first_slay'
slay.h:28: warning: redundant redeclaration of `last_slay' in same scope
slay.h:28: warning: previous declaration of `last_slay'
slay.h:32: redefinition of `struct slay_data'
slay.h:48: warning: redundant redeclaration of `do_destroyslay' in same scope
slay.h:48: warning: previous declaration of `do_destroyslay'
slay.h:49: warning: redundant redeclaration of `do_makeslay' in same scope
slay.h:49: warning: previous declaration of `do_makeslay'
slay.h:50: warning: redundant redeclaration of `do_setslay' in same scope
slay.h:50: warning: previous declaration of `do_setslay'
slay.h:51: warning: redundant redeclaration of `do_showslay' in same scope
slay.h:51: warning: previous declaration of `do_showslay'
slay.h:53: warning: redundant redeclaration of `load_slays' in same scope
slay.h:53: warning: previous declaration of `load_slays'
make[1]: *** [o/imc.o] Error 1
make: *** [all] Error 2
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #5 on Sat 29 Oct 2005 10:58 PM (UTC)
Message
You've done something wrong then. That should not be happening if the instructions had been followed.
[Go to top] top

Posted by Gorock   (149 posts)  [Biography] bio
Date Reply #6 on Sat 29 Oct 2005 11:01 PM (UTC)
Message
ok i found the error when i was trying to fix it i added an include in the wrong spot thank you nick for the help and BTW i looked back on some of my recent posts and i said HOLY CRAP HOW COULD I HAVE BEEN SO DUMB because some of the questions i was asking are like really simple and im sure that later on ill look back at these and say the same thing :P
[Go to top] top

Posted by Conner   USA  (381 posts)  [Biography] bio
Date Reply #7 on Sun 30 Oct 2005 01:21 AM (UTC)
Message
Don't feel too badly, Gorock, we all start out at close to the same level and we all go through that, as rough as it can get, it's called the learning curve and the further along it's path you get the more your past questions will feel simple. :)

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


32,377 views.

It is now over 60 days since the last post. This thread is closed.     [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.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]