title: Lua arithmetic on string variable
body: <p>I have this small snippet of code here;</p>
  
  <pre><code>for i=1,1000 do
      n=math.floor(math.sin(i/10.0)*40)
      s=''
      for j=1,n do s=s+'-' end
      print(s)
  end
  </code></pre>
  
  <p>But it gives me an error on line 2: "attempt to perform arithmetic on global 's' (a string value)" I don't know why it's doing this, and it's driving me mad.</p>