This is of course true in the affine case, so it seems like it should be true in general, because $\mathcal{O}_X(X)$ should be "smaller" for a non-affine scheme than for a similar affine scheme (e.g. all global sections over a projective scheme are constants). Just to be clear on notation:
$X$ is a scheme, not necessarily affine.
$f_1, \ldots, f_n \in \mathcal{O}_X(X)$.
$X_f := \{ x \in X \; | \; f_x \not \in \mathfrak{m}_{X, x} \}$, where $\mathfrak{m}_{X, x}$ is the maximal ideal of the stalk $\mathcal{O}_{X, x}$
$X = X_{f_1} \cup \cdots \cup X_{f_n}$
Does it follow that $(f_1, \ldots, f_n) = (1)$ in $\mathcal{O}_X(X)$?
We have $(f_1|_U, \ldots, f_n|_U) = (1)$ in $\mathcal{O}_X(U)$ where $U \subset X$ is open affine, but I don't see how to extend this to all of $X$.