|  | 
	
	
		| fattony Apprentice
 
 
 Joined: 27 Dec 2001
 Posts: 105
 Location: USA
 
 | 
			
			  |  Posted: Wed Sep 04, 2002 9:05 am 
 Variable Data Record
 
 |  
				| I have a data record variable that stores how many times each person in my party has gotten a specific message. 
 Ex-
 #TRIGGER {^(%w) STRIKES Corn soldier and then STRIKES it AGAIN,$to only STRIKE it AGAIN untill Corn soldier has been HAMMERED down,$and all that remains is a godawful bloody mess!$} {#add pcrit_bloodymess.%lower( %1) 1}
 
 The trigger works fine, but when I #show the var it displays as:
 person1#ofmsgsperson2#ofmsgs
 
 Those 's actually look like a bold | to me though.
 
 Anyway, I know that this display is normal, but I was wondering if there was a way to display them similar to this:
 Person 1 - #ofmsgs
 Person 2 - #ofmsgs
 
 Should I just switch over to using a string list, or is it possible as a data record?
 
 Thanks for any input you may have.
 
 Fat Tony
 |  | 
	
	  |  | 
	
		|  | 
	
		| Kjata GURU
 
  
 Joined: 10 Oct 2000
 Posts: 4379
 Location: USA
 
 | 
			
			  |  Posted: Wed Sep 04, 2002 12:19 pm 
 |  
				| Use #SHOWDB instead of #SHOW. 
 Kjata
 |  | 
	
	  |  | 
	
		|  | 
	
		| fattony Apprentice
 
 
 Joined: 27 Dec 2001
 Posts: 105
 Location: USA
 
 | 
			
			  |  Posted: Thu Sep 05, 2002 2:27 am 
 |  
				| Thank you Kjata, that works just fine. I want this thing to be as versatile as possible though. I would like it to list the results in numeric order (from the person with the greatest number of a certain message, to the person that got that message the least number of times.) 
 Example:
 This is the current output
 - Party Criticals -
 Bloody Mess:
 Person1: 2
 Person2: 4
 Person3: 1
 Person4: 3
 Person5: 6
 
 I would like it to display like
 - Party Criticals -
 Bloody Mess:
 Person5: 6
 Person2: 4
 Person4: 3
 Person1: 2
 Person3: 1
 
 I can probably figure it out if you can point me in the right direction (which commands/functions I should read up on etc) but I'd appreciate any help you can give.
 
 Fat Tony
 |  | 
	
	  |  | 
	
		|  | 
	
		| TonDiening GURU
 
  
 Joined: 26 Jul 2001
 Posts: 1958
 Location: Canada
 
 | 
			
			  |  Posted: Wed Sep 11, 2002 2:02 am 
 |  
				| Simplest thing that comes to mind is putting it into a string list and sorting it.  Depending on how you call your database records and the player's name format, you can do nifty things. 
 
 quote:
 #SHOW %sort(@slist,1)
 
 displays:
 
 def|ABC|ab cd|ab|9|789|45|123|008
 
 
 
 Just be wary that if you get values > 9 you'll have to pad numbers less than 10 with a zero to get a nice sort.
 
 Ton Diening
 |  | 
	
	  |  | 
	
		|  | 
	
		|  | 
	
		|  |