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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Odoth
Wanderer


Joined: 13 Nov 2004
Posts: 54
Location: Visalia, CA

PostPosted: Mon Feb 21, 2005 1:57 am   

Trouble using string lists
 
I'm working on a script to capture on calculate stuff like average exp per kill for instance. The problem I'm running into is that I'm using stringlists to store exp history and I've just realized stringlists will only store unique entries. Sample of what I'm doing:
#show Your average exp over the last %numitems( @exp_history) is: %eval( @exp_total/%numitems( @exp_history))

I use an if statement to keep @exp_history at 10 items.
I'm sure there's a better way to do this, i just don't know how Wink
_________________
*ribbit*
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 21, 2005 3:34 am   
 
Actually, #ADDITEM only adds unique entries. If you use %additem(), you can add duplicates.
_________________
EDIT: I didn't like my old signature
Reply with quote
Odoth
Wanderer


Joined: 13 Nov 2004
Posts: 54
Location: Visalia, CA

PostPosted: Mon Feb 21, 2005 4:29 am   
 
AHA!
It works, thanks. Smile
_________________
*ribbit*
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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