Okay, well my problem is that I made a game thingy and it was working completely fine... except I added a couple more 'potions' and now whenever I choose to fight it says 'Game.exe has encountered a problem and needs to close. We are sorry for the inconveniense.' Then whether or not to send an error report...
EDIT: I figured out where the problem is. When I added comments around this part of the code:
| CODE |
if (str_up > 0) { str_up -= 1; damage -= 1; } if (def_up > 0) { def_up -= 1; defense -= 1; }
|
it works fine. But without the comments, it shuts down when you fight... why?
EDIT AGAIN: Ahh... I figured it out. The problem was that I was declaring the str_up and def_up but not giving them values, so it had no value to check with. Sorry for any inconvienience!
Wow, you just had a whole conversation with yourself, and you didn't even give us a chance to help you. You should be sorry.(jk)
LOL, u solved ur own problem LOL, what was the point of posting it??, to show ur good at programming (JK, dont reply)...yea so are u gonna post the game, cause i am a game developer, well going to be, and i like to look at diffrent aproches to making games with C++, (click "my best work so far" in my signitaruest to see my text RPG i made )
| QUOTE |
| LOL, u solved ur own problem LOL, what was the point of posting it?? |
Well it obviously wasn't solved when he posted it. :lol: