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
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Mon Nov 06, 2017 9:00 am   

How do I show a list as a number?
 
I have a variable as a list of names, how do I convert that into a number?

If the list has 20 names, I want it to show 20.

I want to put that onto a button so that it updates live, always showing the number of items in that list.

Thanks again for any help!
Reply with quote
mikeC130
Apprentice


Joined: 03 Jul 2006
Posts: 108

PostPosted: Mon Nov 06, 2017 7:39 pm   
 
Try %numitems()
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Mon Nov 27, 2017 6:26 am   
 
#switch works as well

list the names via a variable

#TR {(%w) does something) {enemy=%1}
#IF (%2) {#switch (@enemy== "None") {enemy=0} (@enemy== "healthy") {enemy=100} (@enemy== "bruises") {enemy=90} (@enemy== "bleed") {enemy=50} (@enemy== "almost") {enemy=20} (@enemy== "Death") {enemy=10}}
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