title: Lua Boolean compound or
body: <p>I'm just getting started with a basic Lua interpreter, and I've run into this issue:</p>
  
  <pre><code>a = tonumber(a)
  b = tonumber(b)
  if a &lt; 1 or b &lt; 1 or a &gt; x or b &gt; x then
      ...
  end
  </code></pre>
  
  <p>And I'm getting an error message:</p>
  
  <pre><code>Attempt to compare number with string expected, got number
  </code></pre>
  
  <p>I'm new to this. How should that statement be written in Lua?</p>
  
  <p>EDIT: x is set as one of the input arguments. I'm positive that it's a number, not a string; in previous statements I used it as a maximum value in a for loop.</p>