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

#showme {text} {row} does not fire #subs #actions etc.

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



Joined: 11 Feb 2009
Posts: 48

PostPosted: Sun May 17, 2009 1:46 pm    Post subject: #showme {text} {row} does not fire #subs #actions etc. Reply with quote

When you give the {row} argument to #showme it does not call actions, substitutions, etc. This is counter to what the help file suggests it's behavior should be.

Locally, I just changed the do_one_prompt function to call check_all_substitutions, which solved the issue for me. I think I could also use #replacestring within the trigger the does #showme {$prompt} {1}.

Anyway, just thought I'd point out the issue and my solution in case anyone else encounters it. Smile
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sun May 17, 2009 4:41 pm    Post subject: Reply with quote

Fixed it by moving the do_one_prompt call in misc.c below the gag check.

Thanks for letting me know.
Back to top
View user's profile Send private message Send e-mail
reality3k



Joined: 11 Feb 2009
Posts: 48

PostPosted: Wed Jul 08, 2009 2:32 pm    Post subject: Reply with quote

So I finally installed the latest version and encountered an unintended consequence of this addition. Smile

The following action will cause an infinite loop and then a segfault:

Code:
#ACTION {^HP: %d/%d <DHP>: %* SP: %d/%d MANA: %d/%d PTY: (%d\%) %*}
{

        #format prompt {<020>%s<088>} {{%0}};
        #showme {$prompt} {1}
}


It can be fixed by simply changing the string that you put on row 1. I added a space.
Code:
#format prompt {<020> %s<088>} {{%0}};
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jul 08, 2009 2:48 pm    Post subject: Reply with quote

Or alternatively:

Code:

#ACTION {^HP: %d/%d <DHP>: %* SP: %d/%d MANA: %d/%d PTY: (%d\%) %*}
{

        #format prompt {<020>%s<088>} {{%0}}
}

#PROMPT {^HP: %d/%d <DHP>: %* SP: %d/%d MANA: %d/%d PTY: (%d\%) %*}
{
        $prompt
}

Smile
Back to top
View user's profile Send private message Send e-mail
reality3k



Joined: 11 Feb 2009
Posts: 48

PostPosted: Wed Jul 08, 2009 3:19 pm    Post subject: Reply with quote

Yeah, I think the reason I don't use #prompt is it removes the prompt from the mud output. I prefer to see it both in the mud output and also on row 1.

Also, I do funky stuff with that line like:
Code:
#showme {\e]0;$mobhp\% $rounds\cg} {1};
#showme {$prompt} {1};

This flashes the xterm sequence to change the putty window title every round to show the current mob hp and number of rounds in combat. Then I replace it with the actual prompt bar so I don't see it.

Anyway, love tt++. Ecstatic
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jul 08, 2009 4:23 pm    Post subject: Reply with quote

You'd be able to use color and stuff if you'd use:

#split 1 1

and #showme {line} {-1} to print stuff on the top bar rather than the title bar.
Back to top
View user's profile Send private message Send e-mail
reality3k



Joined: 11 Feb 2009
Posts: 48

PostPosted: Wed Jul 08, 2009 5:29 pm    Post subject: Reply with quote

Aye, but then I couldn't keep track of mob hp and combat rounds at work when the window is minimized. Smile
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jul 08, 2009 6:24 pm    Post subject: Reply with quote

Ah okay. The following should work equally well I think.

#showme {\e]0;$mobhp\% $rounds\cg\};

The \ at the end should stop it from print an enter to the screen.
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