As I stated, I've tried multiple things. The first I tried was 'return 0;' which didn't work, and exit() was also tried. I've tried them separately and together, as well as an atexit() thing which also did nothing.
EDIT: Nevermind, I just noticed my typo (aka: (&event)==0) ) and a couple of other issues. I fixed it, lol