Addressing Functions on a different gameobj

Is there anyone who can help me

Assets/Script/PlayerMove.cs(4,24): error CS0116: A namespace can only contain types and namespace declarations

i’m having this error, but i dont know why, it is my first project and i dont know how C# works, so here’s the code and please comment if you know what causes the error

99480-dgs.jpg

for more details the script i want to access is inside an object named “anchor” inside a UI gameobj named “canvas”

thanks for the future response :slight_smile:

Remove line 4 and put it inside the class.
You can’t have variables outside of the class.