A number of things could have caused this. You may have missed out the end of an environment, or you may have an environment inside of another environment it's not allowed to be in. For example, this error can be caused by placing an eqnarray environment inside a displaymath environment, which is not allowed. (But, of course, you haven't used either of those obsolete environments , have you?)
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-00-5).