When you get compiler errors, just start with the first one. Depending on the severity and type of the error, the compiler may have trouble interpreting the follow up code correctly and produce more error messages than there really are.
In your case, the first error points at the first line in function encounter():
void encounter(Player,Battle)
{
if (Player1.level && Player2.level <Battle.min_level)
The error message states that
Quote:
'Player1' was not declared in this scope
or something along these lines, dependent on your compiler. What this means is that the compiler tried to find out what the symbol 'Player1' is, and didn't find a definition for it! If you look at the following compiler errors, you'll spot the same message regarding 'Player2'.
The mistake you made is that you intended to pass the players to the function as arguments, but forgot to write out the full argument definition. You should therefore change the function definition to
void encounter(const Player& Player1, const Player& Player2, Battle& Battle1)
Note that you hadn't specified a argument name for your Battle instance either!
With these changes, a lot of the errors vanish. But new ones pop up, referring to later parts of the code.
Continue like that, each time dealing with only the very first error message, and you should be able to compile your code.
If you're stuck in that process at any point, you can come back and ask about the specific error you don't know how to fix.