hello, I made this simple function:

boolean afuera(int px, int py, int dir) {

switch (dir) {

case 1:

afuera = (px - 1) < 0 || (py + 1) > 7;

break;

case 2:

afuera = (px + 1) > 7 || (py + 1) > 7;

break;

case 3:

afuera = (px - 1) < 0 || (py - 1) < 0;

break;

case 4:

afuera = (px + 1) > 7 || (py - 1) < 0;

break;

}

}

and it keeps coming up this error message, I wish someone could help me:

Arduino: 1.5.6-r2 (Windows 7), Placa:"Arduino Uno"

funciones.ino: In function 'boolean afuera(int, int, int)':

funciones:9: error: assignment of function 'boolean afuera(int, int, int)'

funciones:9: error: cannot convert 'bool' to 'boolean ()(int, int, int)' in assignment

funciones:12: error: assignment of function 'boolean afuera(int, int, int)'

funciones:12: error: cannot convert 'bool' to 'boolean ()(int, int, int)' in assignment

funciones:15: error: assignment of function 'boolean afuera(int, int, int)'

funciones:15: error: cannot convert 'bool' to 'boolean ()(int, int, int)' in assignment

funciones:18: error: assignment of function 'boolean afuera(int, int, int)'

funciones:18: error: cannot convert 'bool' to 'boolean ()(int, int, int)' in assignment

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.