Help fixing something (strlen_color)

Posted by ShadowFangs on Mon 04 Oct 2004 06:18 PM — 3 posts, 14,106 views.

#0
Here is the offending code, and here is what it outputs

    lngth = (70 - strlen_color(title))/2;
    for( ; lngth >= 0; lngth--)
    {
	strcat(title, " ");
    }
    sprintf(buf,"|/\\_\{W%70s{x\_\\n\r", title);
    add_buf(buffer,buf);


  __________________________________________________
 /\_\                                             \_\
|/\_\The Gods of Forgotten Empire         \_\
\_/_|_|                                             |_|
    |_|               Implementors [60]             |_|
    |_|               ******************            |_|
    |_|                    Atm                      |_|
    |_|                                             |_|
 ___|_|                                             |_|
/ \ |_|                                             |_|
|\//_/                                             /_/
 \/_/_____________________________________________/_/  

The line that has "the Gods of forgotten empire" is what
the code outputs (that section, the rest is ok) and
I dont know how to center the (title) in the scroll properly, anybody get what im trying to do?

Thanks for the tip, here it is, like it shows up on my mud
Amended on Tue 05 Oct 2004 04:08 AM by ShadowFangs
USA #1
Yes you can, use the [code] forum code.
Australia Forum Administrator #2
You could try %.70s - that might work.