Code:
bool NewWeap1 = false;
bool NewWeap2 = false;
bool NewWeap3 = false;
bool NewWeap4 = false;
bool NewWeap5 = false;
char WeaponName[15] = "Shotgun";
void CheckCondition()
{
if (damage < pGuy->GetHP() / 3)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED);
MessageBox(0, "Condition Critical!", "Krak's RPG - Krak Productions, 2003", MB_OK);
}
else
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
YourTurn();
}
void CheckWinning()
{
if (damage >= pGuy->GetHP() / 2)
MessageBox (0, "You Defeated the enemy!", "Krak's RPG - Krak Productions, 2003", MB_OK);
else if ( damage >= pGuy->GetHP() / 3)
MessageBox (0, "You Defeated the enemy...barely!", "Krak's RPG - Krak Productions, 2003", MB_OK);
}
void CheckUpgrades()
{
if (pGuy->GetAtt() >= 25 && !NewWeap1)
{
MessageBox(0, "Weapon Evolved!!!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Shotgun became Blaster!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Attack power augmented!", "Krak's RPG - Krak Productions, 2003", MB_OK);
WeaponName[15] = "Blaster";
pGuy->SetAtt(5);
NewWeap1 = true;
}
if (pGuy->GetAtt() >= 39 && !NewWeap2)
{
MessageBox(0, "Weapon Evolved!!!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Blaster became Avenger!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Attack power augmented!", "Krak's RPG - Krak Productions, 2003", MB_OK);
WeaponName[15] = "Avenger";
pGuy->SetAtt(12);
NewWeap2 = true;
}
if (pGuy->GetAtt() >= 52 && !NewWeap3)
{
MessageBox(0, "Weapon Evolved!!!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Attack power augmented!", "Krak's RPG - Krak Productions, 2003", MB_OK);
pGuy->SetAtt(18);
NewWeap3 = true;
}
if (pGuy->GetAtt() >= 74 && !NewWeap4)
{
MessageBox(0, "Weapon Evolved!!!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Avenger became Fallen Angel!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Attack power augmented!", "Krak's RPG - Krak Productions, 2003", MB_OK);
WeaponName[15] = "Fallen Angel";
pGuy->SetAtt(26);
NewWeap4 = true;
}
if (pGuy->GetAtt() >= 90 && !NewWeap5)
{
MessageBox(0, "Weapon Evolved!!!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Fallen Angel became Damien's Wrath!", "Krak's RPG - Krak Productions, 2003", MB_OK);
MessageBox(0, "Attack power augmented!", "Krak's RPG - Krak Productions, 2003", MB_OK);
WeaponName[15] = "Damien's Wrath";
pGuy->SetAtt(40);
NewWeap5 = true;
}
}
When compiled, I get the following errors: