Error cs1022 in unity

I am getting the shown error. I don’t know what it means or how to fix it. Please help. I am new to Unity.

COOOODE:

using UnityEngine;

public class PlayerControl : MonoBehaivior
{//When referencing the Rigidbody component, put “rb” to save time and space.
public Rigidbody rb;

// Update is called once per frame
void FixedUpdate
{
rb.AddForce(0, 0, 1000 * Time.deltaTime); }

}

} }

Ive also been getting this. I have the exact same code. Halp pls

Your curly braces, opening { and closing } need to match up like layers of an onion around your code.

You’re also missing the empty argument list for your FixedUpdate method.

Wherever you copied this code from, go back and copy it more carefully. You need to get all the spelling and punctuation perfect.

1 Like

Please use code tags: Using code tags properly

How to report problems productively in the Unity3D forums:

http://plbm.com/?p=220

Help us to help you.

1 Like

I’m not surprised, since you’re responding to your own thread. Please post the actual error message, as it tells you what the problem is usually. No one memorizes the error codes.

But the closing bracket on your AddForce line looks out of place.

4 Likes

Nice spot Uncle Joe… My Mom always said not to do that.

2 Likes