Hi
Actually I fixed those, now I have a new problem. I keep getting a "forbids comparison between pointer and integer" error for lines 39, 45, 51, and 57. Here's the updated version.
// enter the attack value of your character
int attack;
cout << "Enter the base Attack Value of your character:";
cin >> attack;
// define the possible integer values for the different
// creature name types entered
int nRobot;
nRobot = 50;
int nAnimal;
nAnimal = 40;
int nHumanoid;
nHumanoid = 40;
int nMonster;
nMonster = 70;
// enter the base health of the enemy creature
char type;
cout << "Enter the name of the enemy character type in all lowercase:";
cin >> type;
// define the type value depending on the creature type
int health;
if (type == "monster")
{
health = nMonster;
}
else
{
if (type == "animal")
{
health = nAnimal;
}
else
{
if (type == "humanoid")
{
health = nHumanoid;
}
else
{
if (type == "robot")
{
health = nRobot;
}
Tags: