title: How to put GameCenter on application with swift?
body: <p>I made a game using SpriteKit and Xcode 7 beta. I tried to add GameCenter and Leaderboard but the problem is that the score in the leaderboard won't change (HighScore doesn't upload to GameCenter), It stay 0 all the time and I don't know how to fix it. I'm using 2 different files: GameViewController.swift, and PointsLabel.swift</p>
  
  <p>GameViewController.swift:</p>
  
  <pre><code>import GameKit
  
  class GameViewController: UIViewController,UIGestureRecognizerDelegate, GKGameCenterControllerDelegate {
  
  var score: PointsLabel!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      //initiate gamecenter
  func authenticateLocalPlayer(){
  
      let localPlayer = GKLocalPlayer.localPlayer()
  
      localPlayer.authenticateHandler = {(GameViewController, error) -&gt; Void in
  
          if (GameViewController != nil) {
              self.presentViewController(GameViewController!, animated: true, completion: nil)
          }
  
          else {
              print((GKLocalPlayer.localPlayer().authenticated))
          }
       }
    }
  }
  
  @IBAction func leaderboard(sender: UIButton) {
      saveHighscore(score)
      showLeader()
  }
  
  
  //send high score to leaderboard
  func saveHighscore(score:Int) {
  
      //check if user is signed in
      if GKLocalPlayer.localPlayer().authenticated {
  
          let scoreReporter = GKScore(leaderboardIdentifier: "Leaderboard_01")
  
          scoreReporter.value = Int64(score)
  
          let scoreArray: [GKScore] = [scoreReporter]
  
          GKScore.reportScores(scoreArray, withCompletionHandler: {error -&gt; Void in
              if error != nil {
                  print("error")
              }
          })
      }
  }
  
  
      //shows leaderboard screen
      func showLeader() {
          let vc = self.view?.window?.rootViewController
          let gc = GKGameCenterViewController()
          gc.gameCenterDelegate = self
          vc?.presentViewController(gc, animated: true, completion: nil)
      }
  }
  
  //hides leaderboard screen
  func gameCenterViewControllerDidFinish(gameCenterViewController: GKGameCenterViewController)
  {
      gameCenterViewController.dismissViewControllerAnimated(true, completion: nil)
  
  }
  </code></pre>
  
  <p>There is an Error in this file:</p>
  
  <blockquote>
    <p>Cannot invoke 'saveHighscore' with an argument list of type '(PointsLabel!)'</p>
  </blockquote>
  
  <p>on code: </p>
  
  <pre><code>@IBAction func leaderboard(sender: UIButton) {
      saveHighscore(score) //&lt;- Here is Error
      showLeader()
  }
  </code></pre>
  
  <p>PointsLabel.swift:</p>
  
  <pre><code>import Foundation
  import UIKit
  import SpriteKit
  
  class PointsLabel: SKLabelNode {
  
  var score:Int = 0
  
  init(num: Int) {
      super.init()
  
      fontColor = UIColor.blackColor()
      fontSize = 30.0
  
      score = num
      text = "\(num)"
  }
  
  required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
  }
  
  func increment() {
      score++
      text = "\(score)"
  }
  
  func setTo(num: Int) {
      self.score = num
      text = "\(self.score)"
   }
  }
  </code></pre>
  
  <p>I don't know how to fix it!</p>