How to solve this "xpected primary-expression before ',' token"
This:

#define speaker


defines "speaker" as nothing, an empty string. Then:

tone(speaker,131);


is translated into

tone(,131);


which makes no sense. The compiler expected to find an expression before the comma.