Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
SupadudeX
Beginner


Joined: 05 May 2007
Posts: 17

PostPosted: Sun May 13, 2007 10:43 pm   

String storage
 
I want to store a string as a temporary variable in a trigger. It is matching the line: "Your body feels at full strength." I want to extract everything after "Your body feels" into a temporary string variable so that I can match it. How do I do this. I only see how to match a word so far. Then how do I match this string using the #IF command.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Sun May 13, 2007 11:38 pm   
 
Perhaps

Code:


#trigger {Your body feels (*).$} {TempStringList=%additem(%1,@TempStringList)}




Then to take it out, at some later date....

Code:


#trigger {Your body feels (*).$} {#if (%ismember(%1,@TempStringList) {do Stuff you want to do when it matches}



I hope this helps.


Prog
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net