A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/efun/member_array
int member_array(mixed item, mixed *arr, int step, int start)
Returns the index of the first occurence of <item> in array <arr>.
If not found, then -1 is returned.
The third and the forth argument are optional and determine the step length
and the start index in <arr>.
Example:
To find the description of an item in an items array you could use
this:
int pos = member_array("item", items, 2);
if (pos != -1) string desc = items[pos+1];
See also:
This page was generated in LPC
Imprint / Impressum