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

tab (whitespace) problem?

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



Joined: 16 Jul 2006
Posts: 65

PostPosted: Tue Jul 03, 2007 11:54 pm    Post subject: tab (whitespace) problem? Reply with quote

I have a script (test.tt) that looks like this:
Code:
#var {beep} {bop}
#alias<tab>{hi}<tab>{#showme hello}


If I start up tintin and #read the script then the var will be loaded and the alias is ignored.

I have another script (config.tt) that looks like this:
Code:
#CONFIG           {SPEEDWALK}             {OFF}
#CONFIG           {VERBATIM}              {OFF}
#CONFIG           {REPEAT ENTER}          {OFF}
#CONFIG           {ECHO COMMAND}          {ON}
#CONFIG           {VERBOSE}               {ON}
#CONFIG           {WORDWRAP}              {ON}
#CONFIG           {LOG}                   {PLAIN}
#CONFIG           {BUFFER SIZE}           {5000}
#CONFIG           {SCROLL LOCK}           {ON}
#CONFIG           {HISTORY SIZE}          {50}
#CONFIG           {CONNECT RETRY}         {60}
#CONFIG           {PACKET PATCH}          {0}
#CONFIG           {TINTIN CHAR}           {#}
#CONFIG           {VERBATIM CHAR}         {\\}
#CONFIG           {REPEAT CHAR}           {!}
#CONFIG           {CONVERT META}          {OFF}


If I #read config.tt then #read test.tt I get this message:
Quote:
#CONFIG {TINTIN CHAR} HAS BEEN SET TO {#}.
#OK. VARIABLE {beep} HAS BEEN SET TO {bop}.
#ERROR: #UNKNOWN TINTIN-COMMAND 'alias {hi} {#showme hello}'.


How can I further help debug the code for other problems? Thanks.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jul 04, 2007 8:42 am    Post subject: Reply with quote

Fixed this issue in the latest beta.

Since sourceforge is acting up I uploaded the latest beta to:

http://www.slackhalla.org/~emud/downloads/tintin-beta.tar.gz

For further debugging information you can use the #debug command.
Back to top
View user's profile Send private message Send e-mail
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Wed Jul 04, 2007 9:08 am    Post subject: Reply with quote

Cool. I don't mean the #debug command really though. I saw in another post someone had some other kind of debug information. I think davevnj or someone like that posted it. I think it was tintin sourcecode but I'm not sure how to go about that.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jul 04, 2007 10:11 am    Post subject: Reply with quote

I'm not too sure either, feel free to drop a link if you run into the post that had it.
Back to top
View user's profile Send private message Send e-mail
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Wed Jul 04, 2007 10:31 am    Post subject: Reply with quote

It's DEBUG_STACK stuff from here.

http://tintin.sourceforge.net/bb/viewtopic.php?t=210
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jul 04, 2007 10:52 am    Post subject: Reply with quote

Ah, that pops up when tintin crashes Smile
Back to top
View user's profile Send private message Send e-mail
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Wed Jul 11, 2007 11:22 pm    Post subject: Reply with quote

I found a different oddity relating to whitespace.

Code:
#alias {vit}
{
        #if {$hp >= $hp_max} {
                vitality
        } {
                #show {You need to be fully healthy before you can<space><cr>
<tab><tab><space>call upon your vitality.}
        }
}


Quote:
#ALIAS {vit}={#if {$hp >= $hp_max} {vitality} {#show {You need to be fully healthy before you cancall upon your vitality.}}} @ {5}


Notice "cancall". I really meant for it to be "can call".
I'm not really sure how it SHOULD behave but I like to break up the code so that it's more readable, but be able to reproduce the same results as if I had it all on one line.
Back to top
View user's profile Send private message
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Wed Jul 11, 2007 11:34 pm    Post subject: Reply with quote

Ack sorry I'm not running the latest version though.

[edit] I updated but the behaviour is the same.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Thu Jul 12, 2007 4:02 am    Post subject: Reply with quote

Little I can do about that.

You could use \x20 to print a space.
Back to top
View user's profile Send private message Send e-mail
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Thu Mar 20, 2008 11:07 am    Post subject: Reply with quote

I discovered another hack for the broken line whitespace issue. Cheers Big Smile

A lot of scripting languages will translate backslash-newline as a signal to ignore any following whitespace as well as the backslash-newline. That's why I like this method. (Even if it is kind of different)

Code:
#alias {vit}
{       
        #if {$balance_all && $eq} {
                #if {$hp >= $hp_max} {
                        vitality
                } {                       
                        #show {<018>Full bodily and mental health required\
                        \ before vitality.}
                }
        }
        {       
                cmd_queue vit
        }
}
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