Let $X$ be compact Riemann surface, given a nonconstant meromorphic function $f$ on it, it's well known that the $\deg \text{div}f = 0$ (due to the fact that degree is constant on each fiber), where $\text{div}$ denotes taking divisor of $f$.
And we also have meromorphic 1-form $\alpha = fdz$, the result is that $\deg \text{div} \alpha = 2g -2$( $g$ is the genus of the surface). (for example in Donaldson's book, take a smooth 1-form such that multiplicity of zeros equals to the degree of $\alpha$ and can be proved multiplicity of zeros for smooth 1-form is topological invariant $2g-2$)
Why they are different? why degree of the divsor of the meromorphic function is zero while for meromorphic 1-form is 2g-2?Do I misunderstand somewhere?