TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#format with colored strings

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
titeuf



Joined: 29 Jul 2006
Posts: 84

PostPosted: Thu Oct 18, 2007 4:35 pm    Post subject: #format with colored strings Reply with quote

hi, I've found another bug in tt++: this time with #format and colored strings: it counts the colors as actual characters. Here's an example:
Code:

#var a <123>abc
#OK. VARIABLE {a} HAS BEEN SET TO {<123>abc}.
#format len {%L} {$a}
#OK. VARIABLE {len} HAS BEEN SET TO {8}. (this should be 3)
#format b {%.2s} {$a}
#OK. VARIABLE {b} HAS BEEN SET TO {<1}. (this should be 12)

if you have some time, can you fix this?

Much thanks Smile
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Thu Oct 18, 2007 4:59 pm    Post subject: Reply with quote

I'll look into it Coffee
Back to top
View user's profile Send private message Send e-mail
titeuf



Joined: 29 Jul 2006
Posts: 84

PostPosted: Thu Oct 18, 2007 5:21 pm    Post subject: Reply with quote

and as if you haven't enough work already, #format doesn't work correctly with strings with spaces in them:

Code:

#var a {a b c}
#OK. VARIABLE {a} HAS BEEN SET TO {a b c}.
#format len {%L} {$a}
#OK. VARIABLE {len} HAS BEEN SET TO {1}. (should be 5)


thanks again Thumbs Up
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Fri Oct 19, 2007 3:33 am    Post subject: Reply with quote

You forgot some braces:

#format len {%L} {{$a}}

Should work properly Blink
Back to top
View user's profile Send private message Send e-mail
titeuf



Joined: 29 Jul 2006
Posts: 84

PostPosted: Fri Oct 19, 2007 8:38 am    Post subject: Reply with quote

Scandum wrote:
You forgot some braces:

#format len {%L} {{$a}}

Should work properly Blink

yup, I've found it on my own earlier in class, but couldn't post it cause I couldn't connect to the internet Embarassed
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group