Skip to content

Instantly share code, notes, and snippets.

@simplyluke
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simplyluke/fd7cf9ca23192855b9b1 to your computer and use it in GitHub Desktop.
Save simplyluke/fd7cf9ca23192855b9b1 to your computer and use it in GitHub Desktop.
// You wrote this
if (keyPressed){
if (key == UP)
fill (#F1D5E5);
ellipse (250,265, 9,8); }
else {
ellipse (250,265, 5,4); }
// Should be this
if (keyPressed){
// you forgot to encapsulate this if statement and closed it early
if (key == UP) {
fill (#F1D5E5);
ellipse (250,265, 9,8);
}
} else {
ellipse (250,265, 5,4);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment