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

Doing multiple actions.

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



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 1:22 am    Post subject: Doing multiple actions. Reply with quote

simple code fragment that shows the error I'm seeing deep in some code (I have hook variables that store the after action and they get invoked in this manner).

The alias
Code:
#ali do %0


The working case
Code:
do bounce


The failure case
Code:
do {bounce;bounce}


How do I execute multiple commands with the alias as listed? Is there another way to go about this?
Back to top
View user's profile Send private message
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 1:24 am    Post subject: Reply with quote

Ok I was able to get it to work, however it's spammy about aliases.

When I setup the hook instead of using a variable, I use an alias

elsewhere
Code:
#ali hook %0;


execution
Code:
#ali do {hook; #ali hook #nop}


However even if I turn messages about aliases off (#message alias off) it really wants to tell me that I'm making aliases. How can I disable those messages?

I tried dynamically turning messages about aliases on and off around the critical section, but that also told me that I was turning alias messages on and off, even more spam. There should be a messages category for messages about messages... (#message message)
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Jul 13, 2009 7:46 am    Post subject: Reply with quote

You get a message when you manually create an alias, there's not a whole lot I can do about that.
Back to top
View user's profile Send private message Send e-mail
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 7:50 am    Post subject: Reply with quote

Why doesn't #message alias off turn it off?

The #help message strongly suggests that it should if I substitute ALIAS for VARIABLE in the following.
Quote:
This will show the message status of all your lists if typed without an
argument. If you set for example VARIABLES to OFF you will no longer be
spammed when correctly using the #VARIABLE and #UNVARIABLE commands.


Could they at least be gaggable? (they're not)
Back to top
View user's profile Send private message
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 7:54 am    Post subject: Reply with quote

Verified, if I do #message alias off then I no longer get messages for aliases typed interactively, but I get them when my aliases make aliases.

This seems like a bug. Or the reason I should get them is something other than
Quote:
You get a message when you manually create an alias, there's not a whole lot I can do about that.


since when I manually create an alias I don't get a message.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Jul 13, 2009 8:08 am    Post subject: Reply with quote

Hrm, that seems off.

Can you show a small log of this happening?
Back to top
View user's profile Send private message Send e-mail
reality3k



Joined: 11 Feb 2009
Posts: 48

PostPosted: Mon Jul 13, 2009 10:08 am    Post subject: Re: Doing multiple actions. Reply with quote

Shaiith wrote:
The failure case
Code:
do {bounce;bounce}


How do I execute multiple commands with the alias as listed? Is there another way to go about this?

Maybe I'm missing something but have you tried:
Code:
do bounce;bounce
Back to top
View user's profile Send private message
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 4:40 pm    Post subject: Re: Doing multiple actions. Reply with quote

reality3k wrote:
Shaiith wrote:
The failure case
Code:
do {bounce;bounce}


How do I execute multiple commands with the alias as listed? Is there another way to go about this?

Maybe I'm missing something but have you tried:
Code:
do bounce;bounce


That code is executing (do bounce);bounce
essentially as the ; ends the do.
Back to top
View user's profile Send private message
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 4:59 pm    Post subject: Reply with quote

I love nonreproducible bugs... I've tried everything. Sorry for the issues all I know is that last night I was having issues.

I know what I saw, but it seems to be gone for now. If it reoccurs I'll repost. Thanks for your time.
Back to top
View user's profile Send private message
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 5:07 pm    Post subject: Reply with quote

I'm an idiot... (or just someone back to coding tintin)

Turns out that I had #ali foo %0; at some point and was passing in a blank %0, and then tintin gladly goes and prints out the current status of the alias... Definitely intended behavior.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Jul 13, 2009 5:26 pm    Post subject: Reply with quote

Could be you used #debug alias on which will result in messages always being displayed.
Back to top
View user's profile Send private message Send e-mail
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 6:22 pm    Post subject: Reply with quote

No it was functionally a case of

Code:
#ali hook #nop
#ali assign_hook {#ali hook %0}

assign_hook;
#nop versus
assign_hook bounce;


which is the same as

Code:
#ali hook #nop;

#ali hook;
#nop versus
#ali hook bounce;


the first call prints out the current alias-value of hook, when I really wanted was
Code:
#ali assign_hook {#if {"%0"!=""} {#ali hook %0} {#ali hook #nop}}


Just something for me to remember in future when assigning things to aliases or variables. if I don't give them a new value the code will echo the current value. This is the intended behavior and I'll just have to check for actual values before assigning/aliasing/etc.
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