Let $X$ be a complex manifold and $Y \subset X$ a hypersurface. Let $x \in Y$ and $f$ a meromorphic function on $X$ near $x$. In Huybrecht's Complex Geometry the order of $f$ along $Y$ at $x$ is defined as $ f = g^{ord_{Y,x}(f)} \cdot h $ where $h \in \mathcal O_{X,x}^*$, the sheaf of germs of nonvanishing sections on $x$, and $g\in \mathcal O_{X,x}$ is irreducible and defines $Y$ near $x$.
I'm having trouble coming to grips with this definition. Consider the case $X = \mathbb C^2$ with coordinates $(z_1,z_2)$ and $Y = \{z_1 = 0\}$. Then what is $ord_{Y,(0,0)} z_2$? It seems impossible to write $z_2 = z_1^d h$ for some $h \in \mathcal O_{X,x}^*$. Further, it is stated that the order at any point on an irreducible hypersurface is independent of the point. But clearly $ord_{Y,x} z_2 = 0$ if $x \ne (0,0)$. So if the order is 0 at (0,0) as well, then this is saying that $z_2 \in \mathcal O_{X,(0,0)}^*$. What am I missing?
Thanks.