Difference between revisions of "FindInArray"
Jump to navigation
Jump to search
imported>Haama (Fixed syntax name) |
imported>Haama (Fixed syntax - takes a long) |
||
Line 5: | Line 5: | ||
'''Syntax:''' | '''Syntax:''' | ||
(Index: long) FindInArray ArrayID:long Value: | (Index:long) FindInArray ArrayID:long Value:long ''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:15, 14 February 2008
Beta Function
This function has not been fully tested yet, and is not ready to be used in a released mod. It may not have the same function in later versions, may require the script to be recompiled, or simply may be removed. Use for testing purposes only until the author of the function says otherwise.
A command for Pluggy
Syntax:
(Index:long) FindInArray ArrayID:long Value:long 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 integers (short and long).
- Use FindRefInArray and FindFloatInArray for other value types.
- 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.