I'm having trouble with my no_mana function i want i to stop the player from enetering the skill menu becuase he is out of mana. Even tho it does what i wanted if i input 2 after the MP reaches 0 and then i input 1,3,4. It still lets the player enter the skill menu. I think this has to do with me returning combatMenu() in the no mana function but i'm not sure.
avoid exit(0). It is not hurting anything here, but it is bad practice to abuse it.
exit is meant to end the program with an error code in case of unrecoverable error detected. You should try to wire the program so that it gets back to main and returns (0) from there as a 'normal program exit' approach.
later, you will encounter terminate() which is like exit except it attempts to clean up first. Like exit, terminate is for errors, not normal operations.