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
➜ Problem with Fingerfiles
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Firedraconian
USA (32 posts) Bio
|
Date
| Fri 30 Jul 2004 08:41 PM (UTC) |
Message
| I keep getting an error when I try to clean it up and compile it so that it will work:
player.o(.text+0x78a3): In function 'do_homepage':
/home/nick/smaug/dist/src/player.c:1501:multiple definition of '_do_homepage'
finger.o(.text+0x16cf):/home/nick/smaug/dist/src/finger.c:476: first defined here
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory '/home/nick/smaug/dist/src'
make: *** [all] Error 2
The only time the finger-command snippet mentions finger.c is when it says, "5. In player.c, find and comment out the function do_homepage." I don't think I'm doing that right.
Unfortunately, this is my first time coding, and I have no idea what most of this stuff means that coders take for granted, like when it goes, 'take this and put it in the appropriate spot'. What exactly do they mean by commenting it out? Putting # marks in front of everything, like this:?
#void do_title( CHAR_DATA *ch, char *argument )
|
X. D. Caeruleus
Draconian Industries | Top |
|
Posted by
| Ithildin
USA (262 posts) Bio
|
Date
| Reply #1 on Fri 30 Jul 2004 09:38 PM (UTC) Amended on Fri 30 Jul 2004 09:41 PM (UTC) by Ithildin
|
Message
| First of all, you should try learn more about coding :-)
secondly, to comment out a function would be like this:
/*
void do_homepage
blah blah
code
blah blah
*/
and then paste the new function. the /* to */ will comment out anything in between those two brackets. use them wisely ;)
**********************************************************
This will be a good starting point. You seem to know a little bit, but here is this just in case. also you can search yahoo and google for help with coding.
http://www.gammon.com.au/smaug/howtocompile.htm
have fun. | Top |
|
Posted by
| Buck
USA (23 posts) Bio
|
Date
| Reply #2 on Fri 30 Jul 2004 09:43 PM (UTC) |
Message
| /* You'll see comments like this all throughout the code */ In a .c or an .h file, when you 'comment out' a piece of code, you simply insert this /* at the beginning and this */ at the end so the compiler treats the entire section as a comment instead of code. # is used in the makefile to comment lines out, apparently. |
-Buck.
tbgamecock@yahoo.com
"I am Homer of Borg. Prepare to be assim... ooooo, Doughnuts!" | Top |
|
Posted by
| Ithildin
USA (262 posts) Bio
|
Date
| Reply #3 on Fri 30 Jul 2004 09:51 PM (UTC) |
Message
| yea, the # comments out in the makefile, not in the code itself.
you can also just comment out one line of code using this:
//this line will be commented out
so you can either use /* and */ for a bunch of lines of code or // for one line of code. | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #4 on Fri 30 Jul 2004 10:34 PM (UTC) |
Message
| Note though, that the // style commenting is technically C++ commenting, and you might get some warnings about // comments, depending on what compiler flags your using. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Firedraconian
USA (32 posts) Bio
|
Date
| Reply #5 on Sat 31 Jul 2004 12:45 AM (UTC) Amended on Sat 31 Jul 2004 01:27 AM (UTC) by Firedraconian
|
Message
| Okay, it worked. :) Yay.
New problem. For some reason, even though I have ansi turned on, the colours aren't showing up. -_-
It appears like this:
&w Finger Info
-----------
&wName : &GLordrom &wMUD Age: &G1620
&wLevel : &G65 &w Class: &GWarrior
&wSex : &GMale &w Race : &GHuman
&wTitle :&G the Spell Student
&wHomepage: &G
&wEmail : &G
&wICQ# : &G0
&wLast on : &GFri Jul 30 20:42:39 2004
And I keep getting this bug:
Log: [*****] BUG: Figure_color: color 2592 invalid.
(Edit): Also, I can't get the new commands to save. If I do, cedit save, it doesn't work.
cedit save
Log: Lordrom: cedit save
Command: save
Level: 0
Position: 0
Log: 0
Code: do_save
Flags: |
X. D. Caeruleus
Draconian Industries | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #6 on Sat 31 Jul 2004 03:06 AM (UTC) |
Message
| what functions displaying it? If its something like write_to_buffer, then you will see the color codes. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Firedraconian
USA (32 posts) Bio
|
Date
| Reply #7 on Sat 31 Jul 2004 03:36 AM (UTC) |
Message
| 1) What?
2) How would I fix that?
3) How do I fix the cedit thing so the command actually saves? |
X. D. Caeruleus
Draconian Industries | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #8 on Sat 31 Jul 2004 03:38 AM (UTC) |
Message
| 3.) You're doing save wrong. Its "cedit save cmdtable" as the helpfile... doesn't say, heh. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Firedraconian
USA (32 posts) Bio
|
Date
| Reply #9 on Sat 31 Jul 2004 04:20 AM (UTC) |
Message
| Naturally. ;)
I don't suppose you know how to fix the colour codes so they work, eh? |
X. D. Caeruleus
Draconian Industries | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #10 on Sat 31 Jul 2004 05:16 AM (UTC) |
Message
| Stock Smaug doesn't do colors like that, you have to do things like:
set_char_color( AT_GOLD, ch )
Unless you know how to allow color symbols. There should be a post on that here, somewhere. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #11 on Sat 31 Jul 2004 06:05 AM (UTC) |
Message
| In your finger code, look in the do_finger, and see what function is being used to display that info. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Buck
USA (23 posts) Bio
|
Date
| Reply #12 on Sat 31 Jul 2004 02:41 PM (UTC) |
Message
| I'm not sure what color modifications you have done, so hopefully this isn't redundant but open smaug\dist\doc\FAQ and implement sections 12-a, b and c. I think you are using smaug1.4a_mxp, so your version should be 12-f compliant already. Stock SMAUG is only partially color - enabled because of certain reasons. Just a caveat tho; there are still some minor color bugs I haven't seen definitive solutions for, i.e., inconsistent color strings ( bright green, dark green, when only &G is used ), duplicate strings persisting after FAQ-12-f compliance, etc... Anyway, getting kosher with section 12 will get you to 90% color compatability, which is better than it ships, eh? :) Hope that helps, and if anyone else knows why duplicate strings appear even w/ the 12-f fix implemented, I'd like to know, myself. |
-Buck.
tbgamecock@yahoo.com
"I am Homer of Borg. Prepare to be assim... ooooo, Doughnuts!" | Top |
|
Posted by
| Firedraconian
USA (32 posts) Bio
|
Date
| Reply #13 on Sat 31 Jul 2004 05:37 PM (UTC) |
Message
| Okay, I can't get that to work. I tried it and everytime I try to recompile, it gives me about ten pages of "undefined reference to '_send_to_pager'" and "undefined reference to '_send_to_char'".
I thought that that's what the
#define send_to_char send_to_char_color
#define send_to_pager send_to_pager_color
things were for. I tried both putting them under the #endif in mud.h and just above it, and I keep getting the same error messages. |
X. D. Caeruleus
Draconian Industries | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #14 on Sat 31 Jul 2004 05:39 PM (UTC) |
Message
| Did you also comment out the functions like it said to do? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.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.
58,310 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