Try commenting out sections of code until it works again. If that doesn't work then there might be something else wrong. At that point I'd suggest starting a new project and adding the code from the previous code to it piece by piece in to help pinpoint what might be causing it should it mess up again.