Take a read of Please read: make it easier to help you.
You should post the code in discourse, not as an attachment. The link explains how to format your code. You should also minimize your code as much as possible to make it easier for people to give advice.