error cs1022

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpaceshipMovement : MonoBehaviour
{

public float speed = 10.4f;
// Update is called once per frame
void Update()
{
    Vector3 pos = transform.position;

    if (Input.GetKey("w"))
    {
        pos.y += speed * Time.deltaTime; 
    }
    if (Input.GetKey("s"))
    {
        pos.y -= speed * Time.deltaTime;
    }
    if (Input.GetKey("d"))
    {
        pos.x += speed * Time.deltaTime;
    }
    if (Input.GetKey("a"))
    {
        pos.y -= speed * Time.deltaTime;
    }
    transform.position = pos;
}

whats the problem?,using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpaceshipMovement : MonoBehaviour
{

public float speed = 10.4f;
// Update is called once per frame
void Update()
{
    Vector3 pos = transform.position;

    if (Input.GetKey("w"))
    {
        pos.y += speed * Time.deltaTime; 
    }
    if (Input.GetKey("s"))
    {
        pos.y -= speed * Time.deltaTime;
    }
    if (Input.GetKey("d"))
    {
        pos.x += speed * Time.deltaTime;
    }
    if (Input.GetKey("a"))
    {
        pos.y -= speed * Time.deltaTime;
    }
    transform.position = pos;
}

what’s the problem?

When posting error messages, post the entire message…

If you take a closer look at the message, it tells you what the problem is and where (which line).

You’re most likely missing a closing brace for the class. This is a guess because you didn’t post all the error info…