void value not ignored as it ought to be

hello i have a void value not ignored as it ought to be at the void loop()
can you help me please ?

// programing the pid 

int pin=3;
double previouserror=0;
double cumerror=0; 
double outputvalue;
double integral , proportional, derivative,piderror,pidvalue;
int elapsedtime,currentime,previoustime ;
double input,setpoint;

double kp=2;
double ki=5;
double kd=1;

void setup()
{
currentime=millis();
setpoint=37 ;
Serial.begin(9600);
pinMode(pin,OUTPUT);
}
[b]
void loop()[/b]
{

int inputvalue=map(analogRead(A0),0,1023,0,100);
piderror=setpoint-inputvalue;


previoustime=currentime;
currentime=millis();
elapsedtime= currentime-previoustime;

proportional=kp*piderror;//proportional

//--------------------integral 
if (-3<piderror<3);
{
cumerror+=(elapsedtime*piderror);
integral=ki*cumerror;
}
//---------------------------------

// derivative----------------------- 
derivative=kd *(piderror-previouserror)/elapsedtime;

pidvalue=proportional+integral+derivative;

if(pidvalue < 0)
  { 
   pidvalue = 0;
  }
  if(pidvalue > 255) 
  {
    pidvalue = 255; 
  }
[b]outputvalue=analogWrite(p[color=green][hr][/color]in,pidvalue);[i][i][/i][/i][/b]
Serial.print("input is :");
Serial.println(inputvalue);

Serial.print("error is :");
Serial.println(piderror);



Serial.print("output is  :");
Serial.println(outputvalue;

Serial.println("");
analogWrite(pin,pidvalue);
previoustime=currentime;
previouserror=piderror;
}

outputvalue=analogWrite(pin, pidvalue);
analogWrite() does not return a value.

so it is not possible to see the value of outputvalue ? ?

so it is not possible to see the value of outputvalue ? ?

What do you think is the outputvalue?

If you mean the duty cycle value provided to analogWrite() then it is the same as the integer part of pidvalue=proportional+integral+derivative

What value are you trying to see?

Ok i sort of understand how i was wrong in my thinking

can you please explain to me the duty cycle ? i don't quite understand well what it means as in the context of analogwrite ....
i see what it replaces tho!
Thanks very much