Well, first off… wow, glad I had this link still open in another tab!
Please read this page for how to insert code properly on the forums: Using code tags properly
Next, please specify which line has the error based on the line # that will show up when you paste your code properly.
Next, please do not paste 5,000 lines of code if 50 are sufficient.