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

How do I skip whitespace in action variable substitutions?

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
dave9000



Joined: 05 Oct 2006
Posts: 3

PostPosted: Wed Dec 06, 2006 1:41 pm    Post subject: How do I skip whitespace in action variable substitutions? Reply with quote

I'm trying to set up a trigger to reroll character stats.
The output from the reroll command looks like this:

Code:

Strength              14                   11


with a simialr line for each stat

(I used the code tag to preserve the (Variable) white space )

What I would like to do is is make an action that captures the first number (the new value
of the stat) and assigns it to an appropriate variable. my current trigger for this line
look like this:

Code:

#ACTION {^Strength %1 %2} {#VAR {str} {%1}; say %1 , %2; }


Which does not work: in looks like the variable %1 gets nothing, and %2 gets
the value of the entire line (minus a space I think). What I think I need is a way of
specifying in the first part of the action a variable number of blank spaces to skip
before selecting text to be substituted.

Any Ideas?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Wed Dec 06, 2006 4:30 pm    Post subject: Reply with quote

Did you try the following?
Code:

#act {^Strength              %1                   %2} {#etc}
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 -> General Discussion 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