|  | 
	
	
		| Fuego Ledrey Wanderer
 
  
 Joined: 09 May 2007
 Posts: 64
 Location: Dustin Acres, California
 
 | 
			
			  |  Posted: Tue May 22, 2007 10:03 pm 
 @rift_%1.%key
 
 |  
				| Ok, so I got this trigger capturing the contents of my rift (Achaea) into a database record variable called riftContents (lame, eh?). Anyway, I have these other string list variables (constant) to store all the different kinds of things that can be in my rift, commodities, crystals, herbs, inks, etc.  They are all named appropriately rift_<thing> like, rift_comms, rift_crystals.... You get the idea. Well, I wanted an alias to show JUST the stuff from rift_crystals, or just the stuff from rift_herbs.  So I tried 
 
 
 
	  | Code: |  
	  | #if (%1) {#LOOPDB @riftContents {#if (@rift_%1.%key) {#show %val" of "%key} {}}} |  
 It doesn't display anything.
 
 Any suggestions?
 
 Note:
 
 
 
 
	  | Code: |  
	  | #LOOPDB @riftContents {#show %val" of "%key} |  
 works just fine, but it shows EVERYTHING in my rift, and that is like, 50 different things, not very convenient.
 |  | 
	
	  |  | 
	
		|  | 
	
		| Taz GURU
 
 
 Joined: 28 Sep 2000
 Posts: 1395
 Location: United Kingdom
 
 | 
			
			  |  Posted: Tue May 22, 2007 10:10 pm 
 |  
				| Try 
 
 
	  | Code: |  
	  | #if (%1) {#LOOPDB @riftContents {#if (%concat("@rift_",%1.%key) {#show %val" of "%key} {}}} |  instead.
 |  | 
	
	  | 
		    
			  | _________________ Taz :)
 |   |  | 
	
		|  | 
	
		| Fang Xianfu GURU
 
  
 Joined: 26 Jan 2004
 Posts: 5155
 Location: United Kingdom
 
 | 
			
			  |  Posted: Tue May 22, 2007 10:14 pm 
 |  
				| Or maybe @{rift_%1.%key} or @{%concat("rift_",%1,".",%key)} or something like that. 
 |  | 
	
	  |  | 
	
		|  | 
	
		| Fuego Ledrey Wanderer
 
  
 Joined: 09 May 2007
 Posts: 64
 Location: Dustin Acres, California
 
 | 
			
			  |  Posted: Tue May 22, 2007 10:18 pm 
 |  
				| Taz, your stuff just made everything echo in riftContents, and Fang Xianfu, your stuff didn't echo anything at all :-/ 
 Sorry, and thanks for trying.
 |  | 
	
	  | 
		    
			  | _________________ EDIT: Image moved to Avatar FINALLY.
 |   |  | 
	
		|  | 
	
		| Fang Xianfu GURU
 
  
 Joined: 26 Jan 2004
 Posts: 5155
 Location: United Kingdom
 
 | 
			
			  |  Posted: Tue May 22, 2007 10:32 pm 
 |  
				| You may well be using the wrong syntax here. You says that your @rift_whatever variables are stringlists - if that's true in the sense that they contain lists like {steel|stone|haddock|gold}, you're using the wrong syntax. I think what you mean is "if %key is a member of the rift_%1 list" and for that you need #if (%ismember(%key,@{rift_%1}). 
 |  | 
	
	  |  | 
	
		|  | 
	
		| Fuego Ledrey Wanderer
 
  
 Joined: 09 May 2007
 Posts: 64
 Location: Dustin Acres, California
 
 | 
			
			  |  Posted: Tue May 22, 2007 10:35 pm 
 |  
				| Doh!  I bet you're right, let me go plug it in.  I can't believe I did that :P 
 |  | 
	
	  | 
		    
			  | _________________ EDIT: Image moved to Avatar FINALLY.
 |   |  | 
	
		|  | 
	
		| Fuego Ledrey Wanderer
 
  
 Joined: 09 May 2007
 Posts: 64
 Location: Dustin Acres, California
 
 | 
			
			  |  Posted: Tue May 22, 2007 10:39 pm 
 |  
				| Yeah man, that worked great :P  Thanks a lot! 
 |  | 
	
	  | 
		    
			  | _________________ EDIT: Image moved to Avatar FINALLY.
 |   |  | 
	
		|  | 
	
		|  | 
	
		|  |