I have read many post on why you would get this error, and it usually is because of syntax errors. Especially when getting the {} mixed up with ().
I have thoroughly checked out my code with BIG font size so it would be really easy to see where the fault was at. No luck finding the error, so with the following snipped code:
////////////////////////////////////////
int readButton(int, int);
int main(){
readButton(39, 1);
return 0;
}
// Read pin
int readButton(int GPIOPin, int short)
{
////////////////////////////////
I get the errors of:
In function 'int readButton(int, short int)':
error: expected primary-expression before 'short'
error: expected ')' before 'short'
In your code you are not naming an int called short, you are instead creating a short integer with no name. This contradicts your original definition that states it shall take two integer arguments.
Opps, I compiled the wrong code to test the 'short' to 'shorted' out with. It compiles nicely now. Thank you for your support. It is greatly appreciated.