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
➜ ROM
➜ Running the server
➜ Help fixing something (strlen_color)
|
Help fixing something (strlen_color)
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| ShadowFangs
(3 posts) Bio
|
| Date
| Mon 04 Oct 2004 06:18 PM (UTC) Amended on Tue 05 Oct 2004 04:08 AM (UTC) by ShadowFangs
|
| Message
| 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 | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Mon 04 Oct 2004 06:25 PM (UTC) |
| Message
| | Yes you can, use the [code] forum code. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Wed 06 Oct 2004 06:54 AM (UTC) |
| Message
| | You could try %.70s - that might work. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
13,681 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top