Legacy GM If number is already in array [SOLVED] (Thanks to "whale_cancer")

J

Julian244

Guest
Hey, im trying to check if a number is already in a (1d)array but i dont know how i can do this.....

and sorry for my bad english....
 
You could use a for loop to go through the array and then set a variable if it finds the number you are looking for.

Alternatively, you could use a ds_list instead of an array. ds_lists have a built in function to find values in them and are otherwise very much like arrays.
 
J

Julian244

Guest
You could use a for loop to go through the array and then set a variable if it finds the number you are looking for.

Alternatively, you could use a ds_list instead of an array. ds_lists have a built in function to find values in them and are otherwise very much like arrays.
i already tried it with a foor loop but my friend told me something about a list in c# and i didnt knew that theres a list in gml too thanks i will try it and ask my friend^^
 
Top