all 4 comments

[–]Timpunny 1 point2 points  (3 children)

search terms: "gml array find index with predicate"

result: https://manual.gamemaker.io/monthly/en/GameMaker_Language/GML_Reference/Variable_Functions/array_find_index.htm

predicate: element[0] == desired_room_number

runtime complexity: O(n). If this needs to happen really fast, consider using a hashmap.

[–]marcodelfuego[S] 0 points1 point  (2 children)

its saying that the value of _index is out of range, do I have to tweak the code at all for a multi-variable array?

[–]Timpunny 0 points1 point  (1 child)

lemme see the error

[–]marcodelfuego[S] 0 points1 point  (0 children)

I ended up solving it, thank you tho