lvalue required as left operand of assignment

Hi guys, I'm a total beginner at this so can you guys please help me. I'm getting this error statement and I don't know how to resolve it: lvalue required as left operand of assignment.

This is the part of the code that error is referring to:

Value2 = analogRead(A1);
Serial.println(Value2);

data2 = map(Value2, 0, 1023, 0, 100);

int c;
int d;
data + data2 = c;
c/2 = d;

Thanks for the help!

AyyBruhChill:
Hi guys, I'm a total beginner at this so can you guys please help me. I'm getting this error statement and I don't know how to resolve it: lvalue required as left operand of assignment.

data + data2 = c;

That is not valid code. The assignment needs to be on the left (c = data + data2)

Well ya really should read the "How to use this forum" cause it would help a LOT in this situation. However, based on your input, the problem is that you haven't defined "data". Also, you are trying to assign a value to a statement. In C lingo, c is an lvalue, and it should be on the left side.

AyyBruhChill:
Hi guys, I'm a total beginner at this so can you guys please help me. I'm getting this error statement and I don't know how to resolve it: lvalue required as left operand of assignment.

This is the part of the code that error is referring to:

Value2 = analogRead(A1);
Serial.println(Value2);

data2 = map(Value2, 0, 1023, 0, 100);

int c;
int d;
data + data2 = c;
c/2 = d;

Thanks for the help!

Oh, thank you very much!