I used this piece of code right after converting from Swift 2 to Swift 3, and this error message came up. Any help would be greatly appreciated. I am very new to Swift 3.
func checkIfCorrect (_ buttonPressed:Int) {
if buttonPressed == playlist[numberOfTaps] {
if numberOfTaps == playlist.count - 1 { // we have arrived at the last item of the playlist
let time = DispatchTime(uptimeNanoseconds: DispatchTime.now()) + Double(Int64(NSEC_PER_SEC)) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: time, execute: {
self.nextRound()
})
return
}
numberOfTaps += 1
}else{ // GAME OVER
resetGame()
}
}