what it means, left hand and right hand side of...

Hallo! I need some explanation

what it means,

BCE0051: Operator ‘<’ cannot be used with a left hand side of type ‘Object’ and a right hand side of type ‘float’.

I understand the phrase, but what indicate about the script

great thanks,

please some one set a good tags thanks

Operators are implemented as methods somewhere in the basic types. You can also implement them for your own classes.

i.E. think of the < as a method call in the float class equal to:

public static bool operator <(float f1, float f2);

(Basic types are not implemented as classes in c#, but you can think of them as if they were.)

So when you write

if(0.8f < 0.5f) ...

the compiler interprets this as something like

if(float.<(0.8f, 0.5f)) ... // call the static method with name < from class float

and if you do anything like

Object myObj = new Object();
if(float.<(0.8f, myObj)) ... // call the static method with name < from class float

you will get your error message.

Take care this is not how it is implemented in c# for basic types, but it is like this for more complex classes!! But actually this is how it is interpreted for basic types too somewhere in the background while compilation.

So your error in your script might look like

if(gameObj.transform < 0.5f) // Your error, transform is an object

but what you mean is maybe

if(gameObj.transform.position.y < 0.5f) // Correct, because types are matching .y is float

thanks you very much for the explanations