Tile - Array - Index Of – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
*If the item is present more than once, instruction returns the position of the '''first occurrence'''.
*If the item is present more than once, instruction returns the position of the '''first occurrence'''.
*Returns '''-1''' if the object is '''not found'''.
*Returns '''-1''' if the object is '''not found'''.
=Notes=
*Index numbers always start from 0, e.g: Array of [[Ylands Tile - Array length|length]] 3 has indexes 0, 1, 2




----
----
{{Ylands scripting navbox}}
{{Ylands scripting navbox}}

Revision as of 16:56, 20 December 2018

Editor-VS tile-array index of.png

  • Returns position (index) of the specified object
  • If the item is present more than once, instruction returns the position of the first occurrence.
  • Returns -1 if the object is not found.

Notes

  • Index numbers always start from 0, e.g: Array of length 3 has indexes 0, 1, 2



Template:Ylands scripting navbox