The problem is when I run 'bool CheckLevelUp()'.
As you can see, i set 'PlayersExp' to 0.
When i run 'bool CheckLevelUp()' it says...
"You Are Level One
You Are (Now) Level Two
You Are (Now) Level Three"
and it should just say
"You are Level One"
Im guessing it has to do with how i put "PlayersExp=0-4);" and "PlayersExp=5-10);"...
Anybody know the problem- or even better, a fix?
thanks.
Expand|Select|Wrap|Line Numbers
- #include "Library.h"
- int PlayersExp = 0;
- int PlayersLevel=1;
- bool CheckLevelUp()
- {
- if (PlayersExp=0-4);
- {
- cout<<"You Are Level 1\n";
- }
- if (PlayersExp=5-9);
- {
- cout<<"You are (Now) Level 2\n";
- PlayersLevel=2;
- }
- if (PlayersExp=10-19);
- {
- cout<<"You Are (Now) Level 3\n";
- PlayersLevel=3;
- }
- }