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

'#parse' a variable with '{'s in it

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



Joined: 27 Mar 2012
Posts: 16

PostPosted: Wed Jun 06, 2012 11:03 pm    Post subject: '#parse' a variable with '{'s in it Reply with quote

Using '#parse' on a variable/string containing '{'s in it causes it to throw '#Unmatched braces error!' for each '{' present. Not sure if this can be counted as a bug though, as the error is probably from assigning the '{' to a variable. Anything bad going to happen if I just ignore those errors, as I'm not using the variable it is storing each character to?

EDIT: Or better yet, is there another way to get the length of a variable's contents?
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Thu Jun 07, 2012 11:26 am    Post subject: Reply with quote

Does it help if you "escape" the '{' with a preceding '\' (or what ever the #CONFIG {VERBATIM CHAR} is set to for you)?

And does:
Code:
#FORMAT {result_variable} {%L} {${variable_I_want_the_length_of}}
give you what you want?
Back to top
View user's profile Send private message
Elvang



Joined: 27 Mar 2012
Posts: 16

PostPosted: Thu Jun 07, 2012 1:30 pm    Post subject: Reply with quote

Escaping it doesn't work as it only looks at and stores a single char at a time, so the '{' always gets processed alone.

Using %L with '#format' works perfectly for getting the length, thanks.
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