title: Instance member cannot be used on type - error
body: <p>I have been having a strange error, and have had no luck in trying to fix it. I've got some linked files, and I'm calling a function in one file (<code>ViewController</code>) that's defined in another file (<code>Sign.swift</code>). The function in <code>Sign.swift</code> creates output defined in another file (<code>GameState.swift</code>). I'm not sure what's wrong with this, I've done a lot of research, and even <a href="https://stackoverflow.com/questions/32351343/instance-member-cannot-be-used-on-type">this answer</a> didn't help. (errors under code). </p>
  
  <p><code>ViewController.swift</code>:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      @IBOutlet weak var computerLabel: UILabel!
      @IBOutlet weak var output: UILabel!
      @IBOutlet weak var rockButton: UIButton!
      @IBOutlet weak var paperButton: UIButton!
      @IBOutlet weak var scissorsButton: UIButton!
      @IBOutlet weak var playAgain: UIButton!
  
      @IBAction func rockButtonPressed(_ sender: UIButton) {
          computerLabel.text = randomSign()
          var playerChoice = Sign.rock
          var output = Sign.checkInputs(playerChoice, computerLabel.text) //Error 1 is here
      }
  
      @IBAction func paperButtonPressed(_ sender: UIButton) {
  
      }
  
      @IBAction func scissorsButtonPressed(_ sender: UIButton) {
  
      }
  
      @IBAction func playAgainPressed(_ sender: UIButton) {
  
      }
  
  
  }
  </code></pre>
  
  <p><code>Sign.swift</code>:</p>
  
  <pre><code>import Foundation
  import GameplayKit
  
  let randomChoice = GKRandomDistribution(lowestValue: 0, highestValue: 2)
  
  func randomSign() -&gt; String {
      let sign = randomChoice.nextInt()
      if sign == 0 {
          return ""
      }
      else if sign == 1 {
          return ""
      }
      else {
          return "✌️"
      }
  }
  
  enum Sign {
      case rock, paper, scissors
  
      var emoji: String {
  
          switch self {
  
          case .rock:
              return ""
          case.paper:
              return ""
          case.scissors:
              return "✌️"
          }
      }
  
      func checkInputs(_ user: Sign, opponent: Sign) -&gt; String {
          var outcome = GameState.draw
          if (opponent == .rock) {
              if (emoji == "") {
                  outcome = .draw
              }
              else if (emoji == "") {
                  outcome = .win
              }
              else {
                  outcome = .lose
              }
          }
          else if (opponent == .paper) {
              if (emoji == "") {
                  outcome = .lose
              }
              else if (emoji == "") {
                  outcome = .draw
              }
              else {
                  outcome = .win
              }
          }
          else if (opponent == .scissors) {
              if (emoji == "") {
                  outcome = .win
              }
              else if (emoji == "") {
                  outcome = .lose
              }
              else {
                  outcome = .draw
              }
          }
  
          return outcome //Error 2 is here
      }
  
  }
  </code></pre>
  
  <p><code>GameState.swift</code>:</p>
  
  <pre><code>import Foundation
  
  enum GameState {
      case start, win, lose, draw
  
      var text: String {
  
          switch self {
          case.start:
              return "Game started!"
  
          case.win:
              return "You win!"
  
          case.lose:
              return "You lose!"
  
          case.draw:
              return"It's a draw!"
          }
  
      }
  
  }
  </code></pre>
  
  <p>I am getting errors in both files: Error 1 (commented line in <code>ViewController.swift</code>) has the below error message:</p>
  
  <blockquote>
    <p>Instance member 'checkInputs` cannot be used on type 'Sign'; did you
    mean to use a value of this type instead?</p>
  </blockquote>
  
  <p>Unfortunately I don't understand what I'm mean to fix from the above message, I'm new to Swift.</p>
  
  <p>Error 2 (commented line in <code>Sign.swift</code>) has this message:</p>
  
  <blockquote>
    <p>Cannot convert return expression of type 'GameState' to return type
    'String'</p>
  </blockquote>
  
  <p>Again, I don't understand what's happening here. I don't have any errors in my <code>GameState.swift</code> file though, so that means all errors should be in <code>ViewController.swift</code> and <code>Sign.swift</code>. How should I fix these errors?</p>
  
  <p><strong>EDIT:</strong> I have updated my code, it now looks like this:</p>
  
  <p><code>ViewController.swift</code>:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      func computerChoose() {
  
      }
  
      @IBOutlet weak var computerLabel: UILabel!
      @IBOutlet weak var output: UILabel!
      @IBOutlet weak var rockButton: UIButton!
      @IBOutlet weak var paperButton: UIButton!
      @IBOutlet weak var scissorsButton: UIButton!
      @IBOutlet weak var playAgain: UIButton!
  
      @IBAction func rockButtonPressed(_ sender: UIButton) {
          var random = randomSign()
          var stringRandom = ""
          switch random {
          case .rock :
              stringRandom = ""
          case .paper:
              stringRandom = ""
          case .scissors:
              stringRandom = "✌️"
          }
          var playerChoice = Sign.rock
          var output = Sign.checkInputs(random)
          computerLabel.text = stringRandom
      }
  
      @IBAction func paperButtonPressed(_ sender: UIButton) {
  
      }
  
      @IBAction func scissorsButtonPressed(_ sender: UIButton) {
  
      }
  
      @IBAction func playAgainPressed(_ sender: UIButton) {
  
      }
  
  
  }
  </code></pre>
  
  <p><code>Sign.swift</code>:</p>
  
  <pre><code>import Foundation
  import GameplayKit
  
  let randomChoice = GKRandomDistribution(lowestValue: 0, highestValue: 2)
  
  func randomSign() -&gt; Sign {
      let sign = randomChoice.nextInt()
      if sign == 0 {
          return .rock
      }
      else if sign == 1 {
          return .paper
      }
      else {
          return .scissors
      }
  }
  
  enum Sign {
      case rock, paper, scissors
  
      var emoji: String {
  
          switch self {
  
          case .rock:
              return ""
          case.paper:
              return ""
          case.scissors:
              return "✌️"
          }
      }
  
      static func checkInputs(_ opponent: Sign) -&gt; GameState {
          var outcome = GameState.draw
          if (opponent == .rock) {
              if (emoji == "") { //Error Emoji
                  outcome = .draw
              }
              else if (emoji == "") { //Error Emoji
                  outcome = .win
              }
              else {
                  outcome = .lose
              }
          }
          else if (opponent == .paper) { //Error Emoji
              if (emoji == "") {
                  outcome = .lose
              }
              else if (emoji == "") { //Error Emoji
                  outcome = .draw
              }
              else {
                  outcome = .win
              }
          }
          else if (opponent == .scissors) {
              if (emoji == "") { //Error Emoji
                  outcome = .win
              }
              else if (emoji == "") { //Error Emoji
                  outcome = .lose
              }
              else {
                  outcome = .draw
              }
          }
  
          return outcome
      }
  
  }
  </code></pre>
  
  <p><em>Note:</em> New errors are on every line with the comment <code>Error Emoji</code>, with this error message:</p>
  
  <blockquote>
    <p>Instance member 'emoji' cannot be used on type 'Sign'</p>
  </blockquote>
  
  <p><code>GameState.swift</code>: <strong>Unchanged</strong>.</p>
  
  <p>I would appreciate all help with this.</p>