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

TinTin++ 1.99.2

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    The TinTin++ message board Forum Index -> Announcements
View previous topic :: View next topic  
Author Message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Mar 08, 2009 5:15 pm    Post subject: TinTin++ 1.99.2 Reply with quote

Given how unstable the last release is I went ahead and made a new release. New stuff:

  • Fixed several crash bugs related to %0 usage.

  • Triggers now pre-compile if they do not contain variables or functions, making execution much faster.

  • Macros now default to the more commonly used \ca to \cz for control characters instead of readline's \C-a to \C-z. The old format is still accepted so there shouldn't be backward compatibility issues.

  • Can now use #map create {number of rooms}. World size is stored as C <number> in map files.

  • In triggers %s and %S are now contained in parenthesis so the matched text can be used in the %1-99 variable it's assigned to.

  • %w %W %d %D etc are defined as non lazy when used at the end of a trigger, this should make them behave more tintin-like.


For backward compatibility issues introduced in 1.99.1 see:

http://tintin.sourceforge.net/board/viewtopic.php?t=786
Back to top
View user's profile Send private message Send e-mail
murlyn



Joined: 17 Sep 2007
Posts: 27

PostPosted: Sun Mar 08, 2009 7:56 pm    Post subject: Reply with quote

Ok what's the new syntax for this now?

Code:
#alias {alertme} {
   #action {< %%90H %%91F %%92G %%93X } {
      #if {%%90 < $hps} {
         #bell;
         #showme {<179>************** CURE QUICK!!!! **************};
      } {#nop};
      #if {%%93 < $xp} {
         #bell;
         #showme {<179>************** LEVELING GEAR!!!! **************};
      }
      {#nop};
   };
   #action {TICK!!!} {who};
}


I get this output:

Code:
#MATH EXP: INVALID INPUT { < 30}.
#MATH EXP: INVALID INPUT { < 175000}.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Mar 08, 2009 9:46 pm    Post subject: Reply with quote

That should work, looks like a bug that needs fixing.

The following will work however:

Code:
#alias {alertme} {
   #action {< %%0H %%1F %%2G %%3X } {
      #if {%%0 < $hps} {
         #bell;
         #showme {<179>************** CURE QUICK!!!! **************};
      } {#nop};
      #if {%%3 < $xp} {
         #bell;
         #showme {<179>************** LEVELING GEAR!!!! **************};
      }
      {#nop};
   };
   #action {TICK!!!} {who};
}
Back to top
View user's profile Send private message Send e-mail
murlyn



Joined: 17 Sep 2007
Posts: 27

PostPosted: Sun Mar 08, 2009 10:16 pm    Post subject: Reply with quote

Ok I had changed it to %%1 %%2, %%0 is no good anymore right?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Mar 08, 2009 11:58 pm    Post subject: Reply with quote

You can still use %0 but if left unused it is set by default to hold the matched substring.

If you have: #act {%* is %w here} %* will be stored in %1 and %w in %2. If the line is: "Bob is standing here looking for trouble" %0 would contain "Bob is standing here"

So basically I'm discouraging the use of %0 and make people think of %1 as the first argument, which is more in line with how regular expression implementations generally behave, and also more in line with how aliases behave where %1 has always contained the first argument.

I went ahead and updated the files on sourceforge - so #act {%4 is here} should work, with the original release only: #act {%1 is here} and #act {%0 is here} would work.


Having just looked, using %%w, %%*, etc, won't work as expected, I'll fix that for 1.99.3.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    The TinTin++ message board Forum Index -> Announcements 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