ScriptSpot

Forum topic · General Scripting

searching with multiple hits (search returning more then one find)

By alteredgene · 2009-11-04

Description

Good morning team at scriptSpot!

i had a quick maxScript "approach" question regarding searchs.

basically, i want to be able to search for an item in an array which contains multiple hits.

i.e

#(1,10,1,20,10,1)

and if i wanted to search for 1, using finditem or even more eleborately bsearch, it will only return the first hit, not the whole array of hits.

i was wondering if there is any way of searching an array for all the hits, or occurances.

 Thank you so much in advance!! :)

Comments (1)

le1setreter · 2009-11-05

i would just loop through the array