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
➜ Error with "sharpen"
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Longbow
(102 posts) Bio
|
Date
| Fri 24 Jun 2005 10:13 PM (UTC) |
Message
| I don't know if any of you have tried out the "sharpen" snippet by Rantic from FrozenMUD, but I put it in and all compiles fine until I get to mud.h, when somewhere around line 300(I can't tell exactly cuz I'm using Cygwin and it won't let you scroll up) I get about a bazzilion errors all stating either a conflicting type or a previous declaration of a ton of differant things. What would cause this and how should I go about fixing it? | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Fri 24 Jun 2005 10:28 PM (UTC) Amended on Fri 24 Jun 2005 10:37 PM (UTC) by Zeno
|
Message
| I installed it fine. What errors are they?
[EDIT] It may be that you included a file not needed. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Longbow
(102 posts) Bio
|
Date
| Reply #2 on Fri 24 Jun 2005 11:12 PM (UTC) |
Message
| The errors are in the form of:
mud.h :5433: error: conflictiong types for "eItemBid"
mud.h :5433: error: previous declaration "eItemBid"
etc.
Could it be the patch you have to patch in? I'm not sure how Cygwin allows you patch it in, so I typed <sharpen.patch, which brought up a blank line so I assume it patched it. Perhaps not?
Godbless,
Longbow | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Sat 25 Jun 2005 12:07 AM (UTC) |
Message
| I didn't use the patch. Where is the other declare? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #4 on Sat 25 Jun 2005 02:43 AM (UTC) |
Message
| To get a bigger Cygwin window, right-click on the upper-left icon of the prompt window, go to the 'Layout' tab, and increase the dimensions of the window as you wish. You can adjust not only window size (under 'window size'), but also the amount of lines in the scroll buffer (under 'screen buffer size').
This way, you might get more of an error report.
Another thing you can do is type:
make 2> errors.txt
to fill the file errors.txt with the errors (stderr) from make.
FYI '>' is an output redirector; what make would normally print to the standard error channel i.e. the screen is instead printed to the file errors.txt. The '2' means channel 2, which is the number for stderr. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Longbow
(102 posts) Bio
|
Date
| Reply #5 on Sat 25 Jun 2005 01:53 PM (UTC) Amended on Sat 25 Jun 2005 01:56 PM (UTC) by Longbow
|
Message
| Ok, here's the start of the error list, and it keeps going line after line through the thousands:
------------------
mud.h: At top level:
mud.h:45: error: redefinition of `ch_ret'
mud.h:45: error: `ch_ret' previously declared here
mud.h:46: error: redefinition of `obj_ret'
mud.h:46: error: `obj_ret' previously declared here
mud.h:89: error: redefinition of `sh_int'
mud.h:89: error: `sh_int' previously declared here
mud.h:90: error: redefinition of `bool'
mud.h:90: error: `bool' previously declared here
mud.h:96: error: redefinition of `AFFECT_DATA'
mud.h:96: error: `AFFECT_DATA' previously declared here
mud.h:97: error: redefinition of `AREA_DATA'
mud.h:97: error: `AREA_DATA' previously declared here
mud.h:98: error: redefinition of `AUCTION_DATA'
mud.h:98: error: `AUCTION_DATA' previously declared here
mud.h:99: error: redefinition of `WATCH_DATA'
mud.h:99: error: `WATCH_DATA' previously declared here
mud.h:100: error: redefinition of `BAN_DATA'
mud.h:100: error: `BAN_DATA' previously declared here
mud.h:101: error: redefinition of `EXTRACT_CHAR_DATA'
mud.h:101: error: `EXTRACT_CHAR_DATA' previously declared here
mud.h:102: error: redefinition of `CHAR_DATA'
mud.h:102: error: `CHAR_DATA' previously declared here
mud.h:103: error: redefinition of `HHF_DATA'
mud.h:103: error: `HHF_DATA' previously declared here
mud.h:104: error: redefinition of `FIGHT_DATA'
mud.h:104: error: `FIGHT_DATA' previously declared here
mud.h:105: error: redefinition of `DESCRIPTOR_DATA'
mud.h:105: error: `DESCRIPTOR_DATA' previously declared here
mud.h:106: error: redefinition of `EXIT_DATA'
mud.h:106: error: `EXIT_DATA' previously declared here
mud.h:107: error: redefinition of `EXTRA_DESCR_DATA'
mud.h:107: error: `EXTRA_DESCR_DATA' previously declared here
mud.h:108: error: redefinition of `HELP_DATA'
mud.h:108: error: `HELP_DATA' previously declared here
mud.h:109: error: redefinition of `MENU_DATA'
mud.h:109: error: `MENU_DATA' previously declared here
mud.h:110: error: redefinition of `MOB_INDEX_DATA'
mud.h:110: error: `MOB_INDEX_DATA' previously declared here
mud.h:111: error: redefinition of `CHAR_MORPH'
mud.h:111: error: `CHAR_MORPH' previously declared here
mud.h:112: error: redefinition of `MORPH_DATA'
mud.h:112: error: `MORPH_DATA' previously declared here
mud.h:113: error: redefinition of `NUISANCE_DATA'
mud.h:113: error: `NUISANCE_DATA' previously declared here
mud.h:114: error: redefinition of `NOTE_DATA'
mud.h:114: error: `NOTE_DATA' previously declared here
mud.h:115: error: redefinition of `COMMENT_DATA'
mud.h:115: error: `COMMENT_DATA' previously declared here
etc.
------------------
I do remember that on step that states:
---------
7) Add an "ASSIGN_GSN(gsn_sharpen, "bottle");" line in the boot_db
function, near the other ASSIGN_GSNs (these three steps commonly
known as "adding the gsn").
---------
I did not use "bottle" but "sharpen", as I don't understand why it'd call for "bottle". Could this have something to do with it?
Thanks and God bless!
Longbow
/edit Nope, it wasn't the bottle. /edit | Top |
|
Posted by
| Gatewaysysop2
USA (146 posts) Bio
|
Date
| Reply #6 on Sat 25 Jun 2005 03:08 PM (UTC) |
Message
| Could this possibly be the problem? As others have hinted, maybe you've included something you don't need, namely a double inclusion of mud.h in skills.c (is that where you put the code for this?)
If you take the code directly from sharpen.c, that has an "#include mud.h" statement at the top. If you pasted that into skills.c, you may indeed have a problem since mud.h is *already included* at the top of skills.c. In other words, take one of them out of skills.c if it appears twice.
Just wondering if that might be it, judging from the errors.
|
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #7 on Sat 25 Jun 2005 06:51 PM (UTC) |
Message
| Yes, a double-inclusion of mud.h is nearly without a doubt the culprint here. It could be fixed with a trivial include guard, or simply not including the file twice. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Longbow
(102 posts) Bio
|
Date
| Reply #8 on Sat 25 Jun 2005 08:34 PM (UTC) |
Message
| It fixed it all right! You guys are awesome! Thanks for the help!
A happy Longbow. :) | Top |
|
Posted by
| Longbow
(102 posts) Bio
|
Date
| Reply #9 on Sat 25 Jun 2005 09:03 PM (UTC) |
Message
| Hey guys, one more question. I put in the "charge" skill by the same folks as made "sharpen", and the only error I am getting is:
-------
skills.c:6017: error: too few arguments to function 'is_safe'
----
Now I pasted the code directly from the charge.c document to skills.c so I didn't change anything that I can think of that would cause this. What's up?
Here's the code mentioned in skills.c
--------
if ( is_safe( ch, victim ) )
return;
-----------
| Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #10 on Sat 25 Jun 2005 10:41 PM (UTC) |
Message
| So the errors are fixed?
Look over your "header" of the is_safe funtion, seems like it was modified. Paste it here. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #11 on Sat 25 Jun 2005 11:35 PM (UTC) |
Message
| When you pasted the code from charge.c to skills.c did you do that on your own initiative or was it part of the instructions? In the first case, what did you not paste? Or, in the second case, are you sure you did everything right? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Longbow
(102 posts) Bio
|
Date
| Reply #12 on Sun 26 Jun 2005 01:30 AM (UTC) |
Message
| The txt document says to add the code, preferrably to skills.c, which I did. The only thing I changed was I removed the #include mud.h like we found in sharpen. Then I changed the spelling on some of the send_to_char text fields, but nothing that dealt with the is_safe variable. But the error said there wasn't enough arguments. Wouldn't that be pretty easy to solve, as all it does is check for the char, the victim, and then return? I just am not sure how to make a valid argument to add.
Godbless,
Longbow | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #13 on Sun 26 Jun 2005 01:42 AM (UTC) |
Message
| You should do what Zeno suggested, then, i.e. go find the definition for is_safe and see what it says, and paste it here. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Longbow
(102 posts) Bio
|
Date
| Reply #14 on Sun 26 Jun 2005 02:02 AM (UTC) |
Message
| Whoops, didn't see Zeno's post! Yep, that's what I went and did. It appears the charge code left out the TRUE in the typical string of:
is_safe( ch, victim, TRUE ) )
and instead it said:
is_safe(ch,victim) )
So that is resolved. Thanks again guys! :)
Godbless,
Longbow | 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.
47,965 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top