I assumed it was because it somehow didn’t think that what I was searching for with Find() was in the TArray, so I added an if statement to see if any elements in the array matched up with the FString I was searching for, and it returned true. So it knows that one of the elements in the array matches the element I’m searching for, but for some reason, the Find() can’t find it.
Does anyone know what the problem could be?
Thanks in advance
The TileClassArray is an array of an actor class that has a variable of a user-defined struct, “TileCoordinates,” which is comprised of an int32 “Row” and FString “Column.” AlphabetIndex is an int32, and AlphabetArray is an array of FStrings, each containing one letter of the alphabet. NumberOfColumns is another int32.
if you just want to get the index of the alphabet you can get the char of an string and use that to determine the index. In UTF8 a is 97 and z is 122 so you dont need to have an array with the letters of the alphabet
FString str = "A";
int index = str.ToLower()[0] - 97;