title: Swift - Expected expression in list of expressions
body: <p>I'm new to Swift been reading but have no clue what this means. On the line of code below, I have "Expected expression in list of expressions" after parameters[String]. AS well at the same point it is looking for "Expected ',' separator. I believe these are related.</p>
  
  <pre><code>AppDelegate.submitLacunaRequest(module: "empire", method: "login", parameters[String]:["myuserid", "mypassword", "mykey"]) {
  
              responseObject, error in
  
              // some network error or programming error
  
              if error != nil {
                  println("error = \(error)")
                  println("responseObject = \(responseObject)")
                  return
              }
  
              // network request ok, now see if login was successful
  
              if let responseDictionary = responseObject as? NSDictionary {
                  if let errorDictionary = responseDictionary["error"] as? NSDictionary {
                      println("error logging in (bad userid/password?): \(errorDictionary)")
                  } else if let resultDictionary = responseDictionary["result"] as? NSDictionary {
                      println("successfully logged in, refer to resultDictionary for details: \(resultDictionary)")
                  } else {
                      println("we should never get here")
                      println("responseObject = \(responseObject)")
                  }
              }
          }
  </code></pre>
  
  <p>Here is the related code from AppDelegate</p>
  
  <pre><code>public func submitLacunaRequest (#module: String, method: String, parameters: AnyObject, completion: (responseObject: AnyObject!, error: NSError!) -&gt; (Void)) -&gt; NSURLSessionTask? {
  
      let session = NSURLSession.sharedSession()
      let url = NSURL(string: "https://us1.lacunaexpanse.com")?.URLByAppendingPathComponent(module)
      let request = NSMutableURLRequest(URL: url!)
      request.HTTPMethod = "POST"
      request.setValue("application/json-rpc", forHTTPHeaderField: "Content-Type")
  
  
      let requestDictionary = [
          "jsonrpc" : "2.0",
          "id"      : 1,
          "method"  : "login",
          "params"  : ["myuserid", "mypassword", "mykey"]
      ]
  
      var error: NSError?
      let requestBody = NSJSONSerialization.dataWithJSONObject(requestDictionary, options: nil, error: &amp;error)
      if requestBody == nil {
          completion(responseObject: nil, error: error)
          return nil
      }
  
      request.HTTPBody = requestBody
  
      let task = session.dataTaskWithRequest(request) {
          data, response, error in
  
          // handle fundamental network errors (e.g. no connectivity)
  
          if error != nil {
              completion(responseObject: data, error: error)
              return
          }
  
          // parse the JSON response
  
          var parseError: NSError?
          let responseObject = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: &amp;parseError) as? NSDictionary
  
          if responseObject == nil {
  
              // because it's not JSON, let's convert it to a string when we report completion (likely HTML or text)
  
              let responseString = NSString(data: data, encoding: NSUTF8StringEncoding) as String
              completion(responseObject: responseString, error: parseError)
              return
          }
  
          completion(responseObject: responseObject, error: nil)
      }
      task.resume()
  
      return task
  }
  </code></pre>