Your first statement following the word "attempt" has the correct intuition: "this limit doesn't exist because we have different values for" ... $\lim_{x\to \infty} f(x) $, which depends on x "which could be either odd or even." (So I'm assuming we are taking $x$ to be an integer, since the property of being "odd" or "even" must entail $x \in \mathbb{Z}$).
The subsequent doubt you express originates from the erroneous conclusion that $\infty$ must be even or odd. It is neither. $\infty$ is not a number, not in the sense of it being odd or even, and not in the sense that we can evaluate $f(\infty)$! (We do not evaluate the $\lim_{x \to \infty} f(x)$ AT infinity, only as $x$ approaches infinity.)
When taking the limit of $f(x)$ as $x \to \infty$, we look at what happens as $x$ approaches infinity, and as you observe, $x$ oscillates between odd and even values, so as $x \to \infty$, $f(x)$, as defined, also oscillates: at extremely large $x$, $f(x)$ oscillates between extremely large values and extremely small values (approaching $\infty$ when $x$ is even, and approaching zero when $x$ is odd.
Hence the limit does not exist.
Note: when $x$ goes to some finite number, say $a$, you may be tempted to simply "plug it in" to $f(x)$ when evaluating $\lim_{x\to a}f(x)$. You should be careful, though. This only works when $f(x)$ is continuous at that point $a$. Limits are really only about what happens as $x$ approaches an x-value, or infinity, not what $f(x)$ actually is at that value. This is an important to remember.