#define and const

For pin numbers, change:

#define NamedPin number

to

const byte NamedPin = number;

The errors you got would depend on if you forgot the type ('byte'), the equal sign, or the closing semicolon.

For naming other constants, use the appropriate data type.