Probably you have not selected the correct method for your for loop.
You need to break the tiles string down into characters by using toCharArray() instead.
The indexOf() method will return the position of the char is within the string. And we want to iterate over the string so we need an iterable object that is what your error is saying.
Using toCharArray() converts a string to an iterable array that your for loop can pass over one char at a time.