Ok, I know I'm probably programing in some kind of archaic way for C++ but my knowledge base is rather limited.
I'm having problems with my input not being identified correctly (or however you would say it, rusty is me)
cin>>StatsChange;
if (StatsChange == "Strength" or "strength" or "str" or "STR" or "Str")
{
//Strength Changes
Strength = Strength + 1;
abilpts = abilpts -1;
goto hpmpstat;
}
else if (StatsChange == "Dexterity" or "dexterity" or "dex" or "DEX" or "Dex")
{
//Dexterity Changes
Dexterity = Dexterity + 1;
abilpts = abilpts -1;
goto hpmpstat;
}
else if (StatsChange == "Constitution" or "constitution" or "con" or "CON" or "Con")
{
//Constitution Changes
Constitution = Constitution +1;
abilpts = abilpts - 1;
goto hpmpstat;
}
else if (StatsChange == "Intelligence" or "intelligence" or "int" or "INT" or "Int")
{
//Intelligence Changes
Intelligence = Intelligence + 1;
abilpts = abilpts -1;
goto hpmpstat;
}
else if (StatsChange == "Wisdom" or "wisdom" or "wis" or "WIS" or "Wis")
{
//Wisdom Changes
Wisdom = Wisdom + 1;
abilpts = abilpts -1;
goto hpmpstat;
}
else if (StatsChange == "Charisma" or "charisma" or "cha" or "CHA" or "Cha")
{
//Charisma Changes
Charisma = Charisma +1;
abilpts = abilpts -1;
goto hpmpstat;
}
else
{
//error statement
cout<<"You fail"<<endl;
system("PAUSE");
goto CCRT;
}
When You type in like Dex or something it still only applies the strength bonus. Also if you type in random letters it only goes to the "//strength changes" part of the code instead of the "//error statement" part of the code. Can someone help me resolve this issue? Or bring me up to speed with some code that could help me?