otherwise choose any point p that f(p) is not 0. For any natural number n, there must be a point in the open ball B(p,1/n) that is 0, otherwise g will be indentically zero in this open ball which leads to a global zero of g.

So we get a series of points with which implies f(p)=0.