Skip to content

VECTOR_find_val

BigETI edited this page Jul 16, 2018 · 1 revision

Description

Find the index of the specified value inside the vector

Returns

The index of the found value after or at the specified index if successful, otherwise INVALID_VECTOR_INDEX

Syntax

VECTOR_find_val(Vector:vector, value, from_index = 0)

Example

new Vector:vector;
VECTOR_push_back_val(vector, 10);
VECTOR_push_back_val(vector, 20);
VECTOR_push_back_val(vector, 30);
printf("\"20\" found at vector index %d", VECTOR_find_val(vector, 20));

Clone this wiki locally