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
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Mon Nov 29, 2010 3:38 am   

[3.32] %item helpfile needs update
 
The help file for %item currently reads:
Quote:
item

Syntax: %item(list, n)

returns the nth item of the given stringlist.

As of version 2.06, this function can also be used to retrieve the nth key in a database variable.

Example:

#SHOW %item("Athos|Bertrand|Caesar",3)
displays: Caesar


It retrieves the nth value not the nth key of the database variables.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Nov 29, 2010 1:37 pm   
 
[edited]
Are you sure that it is giving the nth value of a db variable? Can you give an example? It is supposed to give the nth key, as the helpfile says.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 29, 2010 6:36 pm   
 
No, Fixgar is correct. %item returns the *value* and not the key. Use %dbkey for the key. I'll update the help file for %item
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