void value not ignored as it ought to be

Bonjour je dois faire un programme pour contrôler le couple de plusieurs servomoteurs ax12a mais je ne comprend pas l'erreur que j'obtiens voici mon programme :

#include <ax12.h>
#include <BioloidController.h>

int x = ax12SetRegister(1, 34, 150);
int y = ax12SetRegister(2, 34, 150);

void setup(){
ax12SetRegister2(1, 30, 0);
ax12SetRegister2(2, 30, 1023);
ax12SetRegister2(3, 30, 200);

}

void loop(){

while( x<200 && y<200){
ax12SetRegister2(1, 30, 512);
ax12SetRegister2(2, 30, 512);
}
delay(1000);
ax12SetRegister2(3, 30, 300);
delay(3000);
}

et l'erreur que j'obtiens est :

error: void value not ignored as it ought to be

int x = ax12SetRegister(1, 34, 150);

error: void value not ignored as it ought to be

int y = ax12SetRegister(2, 34, 150);

error: void value not ignored as it ought to be

int x = ax12SetRegister(1, 34, 150);

ax12SetRegister() does not return a value. Why are you trying to assign that nothing to an int?

Ok but how can I do to attribute to x the value of the couple of the first servo and y for the second servo which corresponds to address 34 of this library

Ok but how can I do to attribute to x the value of the couple of the first servo and y for the second servo which corresponds to address 34 of this library

I do not understand the question. The function does not return anything, so there is nothing to assign to a variable.

The function takes arguments. The two calls seem to take the number that you want to store in x and y.