it expects ; before void, but when i put it there it still expects it

You can't see that semicolons are at the end of the lines, not the beginning? :o