yTin Online Help  

  Home (english) | Home (chinese) | Downloads | Sample scripts | Online help | Utilities | FAQs | Discussions/Messages | Mud&links | My Progs | Mirrors |

Command: getitemnr - retrieves specified element from a list (NEW)

Syntax:   #getitemnr {destination variable} {item number start from 0} {list}

Example: #geti {dothis} {1} {smile {say Hi!} flip bounce}   <--- sets dothis to 'say Hi!'

Example: #getl Length {$rndsocial};#math itemnr $_random//$Length;#geti temp {$itemnr} {$rndsocial};{$temp}
            (will perform a random social from the 'rndsocial' list)
Another Example:
            #delimiter {;;}
            #var list {n;e;s;;get all;n;;e;e;s}
            #geti {item2} {1} {$list}
The delimiter ";;" breaks the $list into: {n;e;s}, {get all;n} and {e;e;s}
three parts, thus the {item2} variable is now: {get all;n}

See also: #delimiter, #getlistlength