title: Split string to numbers in Lua
body: <p>I've a problem with splitting this:</p>
  
  <pre><code>x = "-301 1021"
  </code></pre>
  
  <p>to this</p>
  
  <pre><code>x = -301
  y = 1021
  </code></pre>
  
  <p>In C++ this is easier but I really don't know how to do it in Lua. I tried do it like </p>
  
  <pre><code>string1 .. string[i] 
  </code></pre>
  
  <p>@Edit
     I've made it like this but now it doesn't get values which are negative</p>
  
  <pre><code> for coordinate in ActualCoords:gmatch("%w+") do 
       table.insert(coordinates, coordinate)
   end
          x = coordinates[1];
          x = tonumber(x);
          z = coordinates[2];
          z = tonumber(z);
  </code></pre>