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

fun with #echo

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



Joined: 17 May 2014
Posts: 22

PostPosted: Sat May 17, 2014 10:19 pm    Post subject: fun with #echo Reply with quote

When the format argument is clearly not two braced arguments, #echo has some screwy behavior:

Code:
#list mylist create 2
#showme $mylist
{1}{2}
#echo %s $mylist
#ERROR: PROMPT ROW IS INSIDE THE SCROLLING REGION: {1} {2}.

#echo {%.0s%s} {fee} {fi}
fi
#echo {%.0s%s} {fee} {$mylist}
#ERROR: PROMPT ROW IS INSIDE THE SCROLLING REGION: {1} {2}.

#echo {%p%s} { } {fi}
fi
#echo {%p%s} { } {$mylist}
#ERROR: PROMPT ROW IS INSIDE THE SCROLLING REGION: {1} {2}.


Although this is an issue of sloppy parsing, the matter is practical: I prefer #echo over #showme so info messages don't activate any triggers. I could make an alias that uses #echo to display whatever arguments I give the alias. If the arguments start with a list, the alias won't work.
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Wed Feb 24, 2016 6:22 am    Post subject: Reply with quote

Just found out that if you leave a character (even a space) before the variable, it will show the content without issues:

Code:

#list mylist create 2
#showme $mylist
{1}{2}

#echo {$mylist}
#ERROR: PROMPT ROW IS INSIDE THE SCROLLING REGION: {1} {2}.

#NOP Now with a character before the variable

#echo { $mylist}
 {1}{2}

#echo { %s} {$mylist}
 {1}{2}

#echo {"$mylist}
"{1}{2}


So, what happens if we use as the first caracter a carriage return ? Wink

Code:

#echo {\r$mylist}
{1}{2}


Seems perfect, I didn't found issues that can be arise from this workaround.


EDIT: anyway here there's another workaround
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Wed Aug 24, 2016 9:45 pm    Post subject: Reply with quote

I'll look into fixing this.
Back to top
View user's profile Send private message Send e-mail
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat Aug 27, 2016 6:58 pm    Post subject: Reply with quote

It's a backwards compatibility issue.

format used to have this syntax:

#format {%s%s} {{arg1}{arg2}}

This confused people so I changed it to:

#format {%s%s} {arg1} {arg2}

Left the old syntax for backward compatibility. Not sure how many scripts would break if I removed the backward compatibility.

As #echo uses #format there's no real way to fix this I think.
Back to top
View user's profile Send private message Send e-mail
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