0

Hello, I am a novice programmer in C++. I know only basic object-oriented ideas and my teacher thinks it is the worst thing that ever happened to mankind and because of that, I only know procedural programming. In addition, he has us use archaic compilers such as CodeWarrior from 10 years ago and a rudimentary graphics engine called "CMU Graphics Lab"

Anyway, introductions aside, I would like assistance from you guys from this trouble I have been having making an RPG as a final project. Here is a snippet of my code:

if (iX>=15)
if (iX<=135)
if (iY>=135)
if (iY<=295)
// Those are the coordinates for an Attack Button for a battle
// sequence.
{
testWindow.SetPen(WHITE, 0);
testWindow.DrawRectangle(424, 146,569 , 165, FILLED);
EBattleHP-20; // HP of enemy subtracted
EHPoutput <<"Enemy HP "<<EBattleHP << "/"<<ETotalHP; // This is akin to cout
testWindow.DrawString(425, 150, EHPoutput.str());
testWindow.SetPen(BLACK, 5);
}

Now, the problem I am having is that the HP subtracted does not stay. It flashes momentarily on the screen, and dissapears. Can any of you help me out? Anything would be appreciated.

Edited by faceguy1: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Ancient Dragon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.