help to fix

how write correctly??

if (direction.x * direction.x > directio.x * directio.x)
        {
            direction.x = null; //(do not use)
        }
        if (direction.x * direction.x < directio.x * directio.x)
        {
            directio.x = null;//same
        }

Writting correctly what?
What data type is x? You have also misspellings.

write correctly = null

because it said"
Cannot convert null to ‘float’ because it is a non-nullable value type
"

You need set float as 0. Not null. It is numeric data type.

Objects can be set as null. However, it isn’t recommended.

ok,thanks, but other ways to do not use the vector.direction???

5361423--542190--upload_2020-1-11_23-2-59.png

If that’s a typo and the n is missing, what is this comparison then?

if (direction.x * direction.x > directio.x * directio.x)