Difference between revisions of "FindRefInArray"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
(Created)
 
imported>Haama
(Fixed syntax - returns ref)
Line 5: Line 5:


'''Syntax:'''
'''Syntax:'''
  (Index: long) FindRefInArray ArrayID:long Value:ref ''Start:long'' ''Stop:long''
  (Index:ref) FindRefInArray ArrayID:long Value:ref ''Start:long'' ''Stop:long''


Returns the index of the first occurrence of Value between indexes Start & Stop in the array.
Returns the index of the first occurrence of Value between indexes Start & Stop in the array.

Revision as of 16:14, 14 February 2008



A command for Pluggy

Syntax:

(Index:ref) FindRefInArray ArrayID:long Value:ref Start:long Stop:long

Returns the index of the first occurrence of Value between indexes Start & Stop in the array.

  • This can only be used to find references.
  • Start is optional. By default it is 0
    • Stop is optional. By default it is the last index of the array
  • If the value is not in the array or the array does not exists, it returns -1.