How can I correct this function compile error?

an LED is plugged into a #pin,

Given your lack of knowledge about the software I hope you don't mind me asking if you have a resistor in series with that LED?

You can make some rule for yourself never to use analog outside of 255,

No it is not a rule for ourselves it is the way the analogWrite function works. It is a PWM signal based on the internal counter / timer registers of the processor. Sure C will let you give it any number, just try and give it 4095, is this brighter or just as bright as 1023?
http://arduino.cc/en/Reference/AnalogWriteResolution

EDIT
This is relevant to most Arduinos