help with "error was not declared in this scope"

float getSetpoint()
  {
   int setpointPin = A1;
   float setpoint = analogRead(setpointPin);
   return setpointPin;
  }

Is that what you want?
Cos that's what you'll get.

float PID(error)

Type?

void actuate(output)

Type?