cs1022

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

public class player : MonoBehaviour
{
[SerializeField] private float speed = 3f; // speedoznik
[SerializeField] private int lives = 5; // speedwagon
[SerializeField] private float jumpForce = 15f; // power of 4JLEH
private bool isGrounded = false;

}

private Rigidbody2D rb;
private SpriteRenderer sprite;

private void Awake()
{
sprite = GetComponentInChildren();
rb = GetComponent();
}

private void Run()
{
Vector3 dir = transform.right * Input.GetAxis(“Horizontal”);
transform.position = Vector3.MoveTowards(transform.position, transform.position + dir, speed * Time.deltaTime);
sprite.flipX = dir.x < 0.0f;
}
private void Update()
{
if (Input.GetButton(“Horizontal”))
Run();
if (isGrounded && Input.GetButtonDown(“Jump”))
Jump();
}
{
private void FixedUpdate();
}

}

Problem number one. People don’t know error codes, its the message associated with that error number that we need.

Problem number two. Please use code tag when posting code. Even if we knew what the error was we wouldn’t be able to find it as easy as we could with the proper formatting.

Problem number three. A simple google search of this error would have it solved.