if object hit(4,2)=1 :play sound 14
delete object 4
make object sphere 4,0.2
position object 4,0,-2.6,0
texture object 4,7
zrotate object 4,object angle z(1)-5
balls_left# = balls_left#-1
score# = score# +1
if score# = 5 then explosion()
`endif
Uncomment that last endif. I don't know if this would be a problem or not:
`SET UP COLLISION :IF BULLLET HITS
It may be trying to parse the if inside that comment. Try taking it out and seeing what happens.
edit: You should also indent your code. Also, whenever you write an if, for, do, etc. always write the closing endif, next, loop before writing any code inside. This will cut down greatly on such problems.