Ansi title

Posted by Johny on Tue 22 Feb 2005 10:46 PM — 19 posts, 73,852 views.

USA #0
I already have my ansi title ready, I even added it to the greeting helpfile, but for some reason it won't work. I get the title screen as if it should show all the coding, like &W and &z.
Anyone mind helping me on this one?
USA #1
You have to define send_to_char as send_to_char_color, it's explained in the Smaug docs. It's also been answered here, so do a search.
USA #2
Check out this post.. its the most helpful one out there


http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2400


it helped me hope it helps you *specifically the second post by Nick Gammon*
Amended on Thu 24 Feb 2005 10:10 PM by Asean Novari
USA #3
I looked at it, and I'm not enitrely sure if mine is the same as how Nick Gammon explain it. Because he said hit CTRL V ESC or CTRL ESC or something to get a ^[ to appear, but when I checked my color.h file it said that I had to type \e in front of it...

Correct me if I misunderstood something.
USA #4
Yes, just moments after I post I post again. This time the code is gone, but the color still is gone as well, so I begin to try again.
Canada #5
What did you change already? You should be able to modify it to print the colors by changing this:
        /*
         * Send the greeting.
         */

        {
                extern char *help_greeting;

                if (help_greeting[0] == '.')
                        send_to_desc_color(help_greeting + 1, dnew);
                else
                        send_to_desc_color(help_greeting, dnew);

        }
USA #6
After working on my title for a bit unsucessfully past my last point, actually degrading in some points, I did a reboot mud now. After this reboot, it wouldn't allow me to reconnect the server. Not the best thing to happen.
Canada #7
Why is it not working? Is it not loaded, or does it crash when it loads? Try using GDB to see whats happening.
USA #8
I suggest using a normal notpad program of some sort to edit the greeting..


^ ^ ^ ^
|..|..|..|
|..|..|. Color of text
|..|. 0 = not bright 1 = bright
|. Prevent color bleed
escape char
Amended on Fri 25 Feb 2005 12:58 AM by Asean Novari
USA #9
Where would I edit this?

It crashes when it loads.

*Doesn't know what GDB is*

It says Reading in area files or something then it crashes.
USA #10
It's right at the top of the page for GDB

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3653
USA #11
Ok, how do I make the ESC char then? Everywhere I look it says type CTRL ESC and that just switches my windows.

Thank you Zeno for the GDB info, but what does it do?

I must've made myself look extremely stupid thanks to my slow computer, by now you've typed something new too I bet.
USA #12
I don't know how to make an ESC character in Windows, only in *nix.

GDB is a debugger, it'll tell you whats wrong.
Canada #13
You shouldn't have to use the manual color, if you use sent_to_desc_color, it will convert the color codes for you.
Amended on Fri 25 Feb 2005 01:31 AM by Greven
USA #14
Ok, then how do I use send_to_char_color?

I also guess I can't get GDB for now, otherwise I'd have to wait for a day or two for my computer to reload.
Canada #15
Hmmm, I guess I should have clarified what version of color code your using and on what codebase, I was going off the assumption of Samson's color code, which may be causing some confusion.
USA #16
Yeah that would work as well.. but its always good to have a backup..


As for making the escape char.. just copy and past it into notepad/wordpad thats about the only way i have found to do it other than the long drawn out send_to_char_color function
USA #17
Oh yeah.. and from now on Johny.. it would be wise to include
your Operating sys, MUD name/version, any other relevant
info.. it helps alot to get more understandable and working
answers
USA #18
Thanks, the copy-paste thing worked. Onto my other posts of problems.