jeudi 23 juillet 2015

Expected declaration of a conditional statement

I now set up my system of putting the answer in 1 of 4 choices but a weird error appeared:

     var optionAnswer:UInt32 = arc4random_uniform(4)
if optionAnswer == 0 {                    // Expected declaration
   optionA.text = secretAnsarrrrr.text
}
if optionAnswer == 1 {
   optionB.text = secretAnsarrrrr.text
}
if optionAnswer == 2 {
   optionC.text = secretAnsarrrrr.text
}
if optionAnswer == 3 {
   optionD.text = secretAnsarrrrr.text
}

the error only appeared on the first conditional and it didn't specify what I needed to do. How do I fix this?

Aucun commentaire:

Enregistrer un commentaire