Understanding and fixing errors
If the LaTeX typesetting engine encounters a problem, it will issue an error message. This is informative and it's intended to help you. So, read the messages carefully. Besides the line number, where the error occurred, a diagnostic message is also provided.
Concentrate on the very first error message. If you continue typesetting, further errors might be just a consequence of the first one that confused the compiler.