if (StatsChange == "Strength" or "strength" or "str" or "STR" or "Str")
should be:
if (StatsChange == "Strength" || StatsChange == "strength" || StatsChange== "str" || StatsChange== "STR" ||StatsChange== "Str")
I know, believe me I did the same thing when I first got into boolean logic.. because the way you do it (aside from the incorrect symbology) seems correct at first, and more code efficient. However, please realize that there are specific rules at play here; each expression is handled individually.
If only one variable exists, the boolean test will either return TRUE if not zero, and FALSE if zero. Example:
if(variable)
{
//code
}
In this instance, if 'variable' contains any value, it will test TRUE and will enter/execute the contents of the if() structure. Conversely, if 'variable' contains a zero, the boolean expression will test FALSE and will simply skip over the entire if() structure.
So like me, you are probably wondering how to avoid these huge multiple lines of logic. Here is one way I can think of:
string input = {"Strength", "strength", "str", "STR", "Str"};
bool match = FALSE:
int i=0;
do{
if(StatsChange == input[i])
{
match = TRUE;
}
}while(match == FALSE || i < 5);
Placing boolean tests inside of a loop could potentially eliminate several lines of logical testing.