-3
@IBAction func blueBtnAct(_ sender: AnyObject) {
score++ //error bcause Unary operator '++' cannot be applied to an operand of type '@lvalue Int'
blueLbl.text = "\(score)"
GrenLbl.text = "\(score)"
testScore()
}
@IBAction func GrenBtnAct(_ sender: AnyObject) {
score-- //error bcause Unary operator '--' cannot be applied to an operand of type '@lvalue Int'
blueLbl.text = "\(score)"
GrenLbl.text = "\(score)"
testScore()
}
Der empfohlene Ersatz wird 'Partitur + = 1 ' – vadian
ja du bist rechts @vadian aber score = score + 1 einfach zum lernen – Zee
Nein, lerne die richtigen Sachen. Wer +++ verstehen kann, wird auch "+ = 1" verstehen ;-) – vadian