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

Alias acting funny with new ver

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



Joined: 03 Dec 2007
Posts: 117

PostPosted: Tue Jul 22, 2008 5:13 pm    Post subject: Alias acting funny with new ver Reply with quote

Running ver TinTin++ 1.98.3 on Ubuntu 8.04

I don't have the problem under 1.98.2

The alias executes fine the first time but not the second. Its populating the %1 with bless and sending 'c bless bless' If you tell it c bless bob, it works, but I want it to just do c armor if there is no %1 given, like it did in the previous ver.

Code:
#alias {bless} {c bless %1}


debug output

[slqvwfp] <580/580hp 568/570m 559/560mv 100br> [AL 512 AC 2][LPK][-] [20,052,167]> bless
#ALIAS DEBUG: bless: c bless
You chant out the arcane words and are drained of 5 mana.

The spectral image of a raven soars down from the Heavens, disappearing into your body.

[slqvwfp] <580/580hp 564/570m 560/560mv 100br> [AL 512 AC 2][LPK][-] [20,052,167]>

[slqvwfp] <580/580hp 564/570m 560/560mv 100br> [AL 512 AC 2][LPK][-] [20,052,167]> bless
#ALIAS DEBUG: bless: c bless bless

[slqvwfp] <580/580hp 565/570m 560/560mv 100br> [AL 512 AC 2][LPK][-] [20,052,167]>
You chant out the arcane words and are drained of 2 mana.
Nobody here by that name.

[slqvwfp] <580/580hp 563/570m 560/560mv 100br> [AL 512 AC 2][LPK][-] [20,052,167]>
Back to top
View user's profile Send private message Yahoo Messenger
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Tue Jul 22, 2008 9:12 pm    Post subject: Reply with quote

Fixed it for the next release. The following alternatives should work correctly:

#alias {bless} {c bless %0}
#alias {bless} {c bless}
Back to top
View user's profile Send private message Send e-mail
Mitlik



Joined: 06 Oct 2008
Posts: 2

PostPosted: Mon Oct 06, 2008 10:30 am    Post subject: Reply with quote

Hi, first time post. I've been using tintin++ for 4+ years and love it.

Not sure if this is the correct place for this, but:

With `#config regexp on' %0 returns the entire string of an alias.

So
Code:
#alias {^unlock ([A-Za-z]+)$}  {unl\ock %0;open %0}

unlock n

#ALIAS DEBUG: unlock: unl\ock unlock n;open unlock n


In fact the `unlock' potion is stored as %1

Is there a look-ahead method, or some other way, I can use to get %0 to equal just the dynamic part of the alias?

Thanks,
Ben
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Oct 06, 2008 4:14 pm    Post subject: Reply with quote

Welcome to the board. Smile

To answer your question, in theorie yes, but I don't want to create a unique to tintin regexp version which would need to be documented and all that, so the answer is no.

The closest you'd get to default behavior would be:

#alias {^unlock (.*)} {#send unlock %1;#send open %1}
Back to top
View user's profile Send private message Send e-mail
Mitlik



Joined: 06 Oct 2008
Posts: 2

PostPosted: Mon Oct 06, 2008 8:48 pm    Post subject: Reply with quote

Alright, thanks. I guess for aliases I know how many arguments I have, but if I run into similar problems with actions expect more posts. Wink

I was hoping for some perl-like re solution for the positive look-ahead assertion. But maybe in the future. Keep up the good work.

Ben
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Mon Oct 06, 2008 9:10 pm    Post subject: Reply with quote

Lil luck I'll get around to adding perl compatible regex one day. Smile
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