[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]  SMAUG coding
. . -> [Subject]  The most newbie'ish thing somebody could ask about colors..

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: The most newbie'ish thing somebody could ask about colors..
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Kalmah   (17 posts)  [Biography] bio
Date Sun 26 Oct 2003 05:05 AM (UTC)  quote  ]
Message
Ahh, nevermind. I figured it out. I didn't notice the 'else' and was cutting it off too short. Everything seems to be working just like I wanted now.

Thanks for the help.
[Go to top] top

Posted by Kalmah   (17 posts)  [Biography] bio
Date Sun 26 Oct 2003 02:23 AM (UTC)  quote  ]

Amended on Sun 26 Oct 2003 02:25 AM (UTC) by Kalmah

Message
Thanks again for your reply.

I'm still getting errors. Here's a screenshot of it.

<img src="http://bellsouthpwp.net/d/e/deadnight213/errors.jpg">

This is what my comm.h looks like in those particular areas.

/* void send_to_char( const char *txt, CHAR_DATA *ch ) */
/*     {                                               */
/*     if ( !ch )                                      */
/*     {                                               */
/*      bug( "Send_to_char: NULL *ch" );               */
/*      return;                                        */
/*      }                                              */

And the other one..

/* void send_to_pager( const char *txt, CHAR_DATA *ch ) */
/* {                                                    */
/*  if ( !ch )                                          */
/*   {                                                  */
/*    bug( "Send_to_pager: NULL *ch" );                 */
/*    return;                                           */
/*  }                                                   */


I put what you said in mud.h. I didn't bother to post that here since it probably isn't a problem.

I appreciate it.
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Sun 26 Oct 2003 01:52 AM (UTC)  quote  ]
Message
Yes, in comm.c comment out the whole function. I think. If it doesn't work, post again.

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

Posted by Kalmah   (17 posts)  [Biography] bio
Date Sun 26 Oct 2003 01:04 AM (UTC)  quote  ]
Message
Thanks alot for the help. I'm having a bit of a problem which is probably quite simple.

When I compile I get an error that looks like this.

comm.c error: redefinition of send_to_char
send_to_char previously defined here

And it says the same thing with send_to_pager

When you said to comment those out did you mean just comment out the function or the function and everything inside of it? (all the way to the return;) Well, I tried both ways and still get the same error so I'm guessing the problem is with something else.. maybe?

I'm really a newbie.. (it was only about a week ago I made my 'hello world' program) hehehe

I also want to make sure their isn't a mis-understanding.
I DO get colors in the mud. room descriptions are green, mobs are yellow, items are blue.. It's just the '&' token to change colors in room descriptions and on channels doesn't work.

Thanks alot. I really appreciate it.
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Sun 26 Oct 2003 12:11 AM (UTC)  quote  ]
Message
The smaug documents explain it, but I'll post it here.

12b) Adding color to the entire game!
Open mud.h, and goto the very end of the file.  Add the two lines:

  #define send_to_char	send_to_char_color
  #define send_to_pager	send_to_pager_color

This well tell the compiler to use the color counterparts whenever either of
those two functions are called.  Then in comm.c, comment out the two functions
send_to_char() and send_to_pager() so that the compiler won't be trying to
compile two compies of the same function (the real one and the one that's
created when the #defines are convertted by the preprocessor).


That should get it to work.

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

Posted by Kalmah   (17 posts)  [Biography] bio
Date Sat 25 Oct 2003 09:36 PM (UTC)  quote  ]
Message
Yeah, I guess that's what I'm trying to do. Just want to add color to room descriptions.. (and that vmap which is also part of a room description)

I havn't made any changes in the .h files for color except for changing the do_score to add color to that.

So I'm going to have to make a change somewhere so that I can use '&' to change colors for room descriptions and channels? I figured that was something that would work without making changes. I've done alot of area building for other peoples muds and always did that.

Sorry, I'm a bit new to this. Could you tell me what file I have to make the changes in or what document that explains it?

Thanks, I appreciate it.
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Sat 25 Oct 2003 08:17 PM (UTC)  quote  ]
Message
So you want to use hard coded colors such as &R? And when you try, it just displays as "&R"? Did you remember to define "send_to_pager" as "send_to_pager_color" etc, as it said in the documents?

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

Posted by Kalmah   (17 posts)  [Biography] bio
Date Sat 25 Oct 2003 07:52 PM (UTC)  quote  ]
Message
Thanks for your reply. But I was unable to find anything
concerning colors in the mud.

I guess I could have been more specific too.
Colors work, I see all kinds of colors. (the ones that are
hard-coded in).. The '&' works fine when setting a characters prompt. My character has a very colorfull prompt. But when It comes to room descriptions, notes, and channels the '&' doesn't do anything.. You actaully see the '&' token typed into the text when you're reading it.

The reason I'm so concerned about it is that I'm working on a virtual map for an overworld area that uses color. It's not much of a map when It's all the same color and you can see the '&' tokens between every character on the map.

I know this shouldn't be so difficult...

I appreciate it.
[Go to top] top

Posted by Anavel   Mexico  (124 posts)  [Biography] bio
Date Sat 25 Oct 2003 11:57 AM (UTC)  quote  ]
Message
Smaug 1.4a has lots of bugs theres a list of bugs on websites (search on google for "smaug 1.4a bug list") that you can get to fix them but you need a compiler and if you don't have one you'r screwed. :P
[Go to top] top

Posted by Kalmah   (17 posts)  [Biography] bio
Date Sat 25 Oct 2003 08:40 AM (UTC)  quote  ]
Message
Heh, when writing room descriptions.. the & token is supose
to specify a color.. so If I type &B it would make the text
after that blue.. correct? Well it doesn't seem to work.
In the room description I see the color tokens, and the color stays the same. I also tried the '{' since some muds use that. Ansi is turned on. But the mud doesn't seem to recognize the '&' as a token to change the color. I'm running smaug 1.4a.

Anybody know what the deal is?
[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,982 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

[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]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]