(SOLVED) Script error getting Object to move

So I am trying to make a plate of food move.

When I get this script:

function Update() {
		// Move the object to the right relative to the camera 1 unit/second.
		transform.Translate(Time.deltaTime, 0, 0, Camera.main.transform);
	}

I don’t even get chance to attach it to my “plateoffood” because I get this error:

The type or namespace name `function’ could not be found. Are you missing a using directive or an assembly reference?

I try replacing “functon Update ()” with namespace.name.plateoffood Update ()

However I get this error:

Unexpected symbol `namespace’ in class, struct, or interface member declaration

I tried asking a similar question ealier and I was directed here by a moderator and my question was denied. Now I have tried their solution and I still don’t understand. I am a huge beginner with coding and I want to stop always stealing code from YouTube videos and using the Unity examples and tutorials on coding for myself , though I am struggling.

I would appreciate some help.

P.S Every time I try and add the second bit of code it changes into numbers and symbols…?

It is

void Update(){}

if you are using C#.

As BiG says it seems like you are using javascript in a c sharp script. If you are having trouble with telling them apart i urge you to go through the C# (C-sharp) tutorials at the unity learn site.
However to answer your question as posted by BiG change function Update() to void Update()

Yep, switching the script to Javascript solved it. Thanks guys! Now to just get it to move in the right direction…