Difference between revisions of "Arrays (Papyrus)"

Jump to navigation Jump to search
m
I'm not sure what "requires 1.6" meant in 2014, but today it incorrectly implies that Find() requires the AE version of Skyrim. Phrase removed.
imported>Pragasette
m (→‎See Also: update link to archive.org since bethsoft.com went AWOL)
m (I'm not sure what "requires 1.6" meant in 2014, but today it incorrectly implies that Find() requires the AE version of Skyrim. Phrase removed.)
 
Line 189: Line 189:


=Searching Arrays=
=Searching Arrays=
''(Requires 1.6)'' Arrays can be searched using two different methods, called "find" and "rfind". Find searches the array from the element you give it (default is element 0) and goes forward through the array to the final element, or the first match it finds, whichever is first. RFind does the same thing, only backwards, starting at the element you give it (default is -1, which means the last element) and going towards element 0. If the item is not found, it will return a negative number for the index.
Arrays can be searched using two different methods, called "find" and "rfind". Find searches the array from the element you give it (default is element 0) and goes forward through the array to the final element, or the first match it finds, whichever is first. RFind does the same thing, only backwards, starting at the element you give it (default is -1, which means the last element) and going towards element 0. If the item is not found, it will return a negative number for the index.


Find syntax:
Find syntax:

Navigation menu