For a matrix to be non-invertible, its determinant must be zero. We calculate the determinant of the given matrix and solve for \( x \) when it equals zero.
The determinant of a 3x3 matrix is given by:
\[
\text{det}(A) = a(ei - fh) - b(di - fg) + c(dh - eg)
\]
For the given matrix:
\[
A = \begin{bmatrix}
1 & 3 & 0 \\
2 & x & 4 \\
-1 & 0 & 2
\end{bmatrix}
\]
Calculating the determinant:
\[
\text{det}(A) = 1 \left( x . 2 - 4 . 0 \right) - 3 \left( 2 . 2 - 4 . (-1) \right) + 0
\]
\[
= 1 \left( 2x \right) - 3 \left( 4 + 4 \right)
\]
\[
= 2x - 3 . 8 = 2x - 24
\]
Now, for the matrix to be non-invertible, we set the determinant equal to zero:
\[
2x - 24 = 0
\]
\[
2x = 24 \Rightarrow x = 12
\]
Thus, the value of \( x \) for which the inverse does not exist is \( \boxed{12} \).