I have learned that a regular function on a irreducible projective veriety is constant (if the field is algebraically closed).
Now consider $$\varphi:\mathbb{P}^1\rightarrow\mathbb{P}^n,\quad (t_0:t_1)\mapsto(t_0^n:t_0^{n-1}t_1:t_0^{n-2}t_1^2:...:t_1^n).$$
This is a regular function on the irreducible variety $\mathbb{P}^1$ which is not constant.
Where is my mistake?