If you're copying straight from the forum and pasting it, then saving it, you're gunna have a bad time.
The forum messes some code up, therefore you're going to have errors. Perhaps before saving, you look over the code.
See if everything has been closed properly, for example a semicolon ( ; ) is used where necessary.