I am new to coding and I was coding a game in android studio. I was coding and a red line comes underneath the word else when I put it, I was wondering if you could help me get rid of those lines.
public boolean onTouchEvent(MotionEvent me){
if (me.getAction() == MotionEvent.ACTION_DOWN);
{
action_flg = true;
} else if (MotionEvent.ACTION_UP == me.getAction()) {
action_flg = false;
return true;
}
}
The red line is under the last '}' and the last 'else' that is in front of the '}' Also there is a mistake, on top of this text there is a single '}' alone. very last one, that is part of the code.
Aucun commentaire:
Enregistrer un commentaire