I am trying to change the text of my label called score with the contents of the currentScore but I keep getting an error:
Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
I also get this error in the console:
fatal error: unexpectedly found nil while unwrapping an Optional value
Anyone ever encountered this? I have no idea what I'm doing wrong.
@IBOutlet weak var score: UILabel!
var currentScore = 0
let text = "You scored a \(currentScore) out of 3"
score.text = text