Welcome to the Builder Academy

Question Issue With Color and Prompts

More
24 Dec 2012 12:58 - 24 Dec 2012 13:01 #1207 by zusuk
Hello folks, a note of reference, I'm running tba codebase 3.63 (before any of the revisions currently in the SVN) so this is probably an issue already addressed by revisions, but I'm not sure where to look for those changes.

Here's the deal: I added a toggle as requested by a builder to add the room name they are currently standing in to the prompt. The issue I'm having is if there is color codes in the room title, the prompt is not displaying the color correctly. Ex:
Instead of displaying "A Floating Bog" in dark gray, it is showing this:
DA Floating Bog [13100]

Here is my code in make_prompt in comm.c
Code:
if (PRF_FLAGGED(d->character, PRF_DISPROOM) && len < sizeof(prompt)) { count = snprintf(prompt + len, sizeof(prompt) - len, "%s%s ", world[IN_ROOM(ch)].name, CCNRM(d->character,C_NRM)); if (count >= 0) len += count; if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) { count = snprintf(prompt + len, sizeof(prompt) - len, "[%5d]%s ", GET_ROOM_VNUM(IN_ROOM(ch)), CCNRM(ch, C_NRM)); if (count >= 0) len += count; } }

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100
Last edit: 24 Dec 2012 13:01 by zusuk.

Please Log in or Create an account to join the conversation.

More
25 Dec 2012 00:21 #1208 by Liko

zusuk wrote: Hello folks, a note of reference, I'm running tba codebase 3.63 (before any of the revisions currently in the SVN) so this is probably an issue already addressed by revisions, but I'm not sure where to look for those changes.

Here's the deal: I added a toggle as requested by a builder to add the room name they are currently standing in to the prompt. The issue I'm having is if there is color codes in the room title, the prompt is not displaying the color correctly. Ex:
Instead of displaying "A Floating Bog" in dark gray, it is showing this:
DA Floating Bog [13100]

Here is my code in make_prompt in comm.c

Code:
if (PRF_FLAGGED(d->character, PRF_DISPROOM) && len < sizeof(prompt)) { count = snprintf(prompt + len, sizeof(prompt) - len, "%s%s ", world[IN_ROOM(ch)].name, CCNRM(d->character,C_NRM)); if (count >= 0) len += count; if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) { count = snprintf(prompt + len, sizeof(prompt) - len, "[%5d]%s ", GET_ROOM_VNUM(IN_ROOM(ch)), CCNRM(ch, C_NRM)); if (count >= 0) len += count; } }


I would upgrade to 3.64's colour code. I just plugged this into GLU and it works perfect.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
25 Dec 2012 05:41 #1210 by zusuk
Hmmm, OK... do you know which files I should diff (upgrade)?

-Zusuk

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
25 Dec 2012 17:37 #1211 by Liko

zusuk wrote: Hmmm, OK... do you know which files I should diff (upgrade)?

-Zusuk


I meant 3.63 and here is the link to the patch file

tbamud.com/downloads/viewdownload/7-patc...d-3-62-to-3-63-patch

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
26 Dec 2012 06:34 #1212 by zusuk
Hey Liko, are you running the most recent revision of 3.63 via the SVN or are you running from that stock code link you gave me?

I'm running 3.63, but without any of the 300+ revisions they've made to it :P

-Zusuk

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

More
26 Dec 2012 15:14 #1213 by Liko

zusuk wrote: Hey Liko, are you running the most recent revision of 3.63 via the SVN or are you running from that stock code link you gave me?

I'm running 3.63, but without any of the 300+ revisions they've made to it :P

-Zusuk


I upgraded from 3.62. I have added some of the revisions, made my own, and etc.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.250 seconds