Let be $k$ an algebraically closed field and let's consider a projective algebraic set $V\subseteq\mathbb P^n_k$ with the induced Zariski topology. If $U\subseteq V$ is open, likewise the affine case, regular functions on $U$ are those functions that can be written locally as $\frac{f}{g}$ where $f,g\in \Gamma[V]_h$ are represented by homogeneous polynomials of the same degree.
If $V$ is an affine algebraic set one can show that $\mathcal O_V(D(f))=\Gamma[V]_f$ for all $f\in \Gamma[V]$.
In the projective case with the sheaf of regular functions definited above, can be shown that
$\mathcal O_V(D(f))=\Gamma[V]_{(f)}$
where $\Gamma[V]_{(f)}:=\{\frac{g}{f^n}\,:\, g,f\;\textrm{are homogeneous and}\; deg(g)=deg(f^n)\}$. This formula is true if $deg(f)>0$ because, for example, if $f=1$ then we would have $\mathcal O_V(D(1))=k$ so the global regular functions would be only costant functions on $V$. This is wrong because if $V$ is not connected we have other regular functions, precisely functions that are costant on every connected component of $V$.
So my question is: when one proves the relation $\mathcal O_V(D(f))=\Gamma[V]_{(f)}$, what is that goes wrong in the case $deg(f)=0$?