title: error loading module '(' expected near '='
body: <p>This code is to create function listeners for the cannon shooting. When i run the code, it gave me an error Question1.lua:43 '('expected near '='</p>
  
  <pre><code>function cannonCharge = function(event)
    if(event.phase == 'began') then
          impulse = 0
          cannon.isVisible = true
          Runtime:addEventListener('enterFrame', charge)
          print ('cannonCharge')
      end
  end
  
  function shot = function(event)
      if(event.phase == 'ended') then
  
          Runtime:removeEventListener('enterFrame', charge)
          cannon.isVisible = true
          cannon.rotation = 0
  
          cannonBall = display.newImage('cannon ball.png', 84, 220)
          physics.addBody(cannonBall, {density = 1, friction = 0, bounce = 0})
          cannonBalls:insert(cannonBall)
          print ('shot')
  
  -- Shoot cannon ball
  cannonBall:applyLinearImpulse(3, impulse, cannonBall.x, cannonBall.y )
  
  --Collision listener
  cannonBall:addEventListener ('collision', ballCollision)
  
      end
  end
  
  function scene:createScene(event)
  ...
  </code></pre>
  
  <p>I added the listeners to enterScene</p>
  
  <pre><code>function scene:enterScene( event )
  local group = self.view
  background:addEventListener('touch', cannonCharge)
  background:addEventListener('touch', shot) 
    end
  </code></pre>