I am having an issue checking a specific element of a string array with a string of my choice.
Here is the idea:
Array[0] has a string value which is read off the first line of a text file.
I have the play input a string value.
The inputted value is checked with Array[0]
And… It tells me if the player has won or not.
Seems easy enough… I could go for “if (array[0] == playervalue)…” but that doesn’t work for some reason. When I ran through debug tests, it says whatever string value is inputted, it doesn’t accept it.
I even had the value of array[0] outputted so the player could type in exactly what was in and it didn’t work.
I have tried Array.IndexOf etc. but those don’t seem to work. Is there a sort of format the playervalue must be in?