mardi 26 avril 2016

Cannot convert call result type "Bool" to expected type int?

I'm trying to change daysMonth[2] to 29 but I get an error in the if statement. Can you resolve the above error?

var rem4 = 0;
var rem100 = 0;
var rem400 = 0;

//error Cannot convert call result type "Bool" to expected type "Int"
if (((rem4 == 0 && rem100 != 0) | rem400 == 0)){
     daysMonth[2] = 29
}

Aucun commentaire:

Enregistrer un commentaire