This might sound dumb to many people, but if I were to blindly try and carbon-copy the proof of Proposition 1.7 in Hartshorne to Exercise 2.6 where would I go wrong? Basically, I don't see where exactly that proof is failing?
$\bf{Propositon 1.7}$ If $Y$ is an affine algebraic set, then the dimension of $Y$ is equal to the dimension of its affine coordinate ring $A(Y).$
$\bf{Proof.}$ If $Y$ is an affine algebraic set in $\mathbb{A}^n$, then the closed irreducible subsets of $Y$ correspond to prime ideals of $A=k[x_1,...,x_n]$ containing $I(Y).$ These in turn correspond to prime ideals of $A(Y)$. Hence $\dim Y$ is the length of the longest chain of prime ideals in $A(Y)$, which is it's dimension.
$\bf{Exercise 2.6.}$ If $Y$ is a projective variety with homogeneous coordinate ring $S(Y)$, show that $\dim S(Y)=\dim Y+1.$
Thanks!