Search Unity

Other Error Code 1022 Pls Help

Discussion in 'Input System' started by Stem110, Feb 18, 2023.

?

How do I fix this error?

  1. Add...

    0 vote(s)
    0.0%
  2. Remove...

    0 vote(s)
    0.0%
  1. Stem110

    Stem110

    Joined:
    Feb 18, 2023
    Posts:
    4
    I'm trying to make a game where you can't jump and i keep getting error code 1022. If you know what's wrong please help me out here.

    Script:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class Movement : MonoBehaviour {
    {
    float horizontal;
    float speed = 8f;
    float jumping power = 16f;
    bool isFacingRight = true;

    [SerializeFeild] Rigidbody2D rb;
    [SerializeFeild] groundCheck;
    [SerializeFeild] groundLayer;

    // Update is called once per frame
    void Update();
    {
    horizontal = Input.GetAxisRaw9"Horizontal");

    if (Input.GetButtonDown("Jump") && IsGrounded)); {
    rb.velocity = new Vector2(rb.velocity.x, jumpingpower);
    }
    }
    if (Input.GetButtonUp("Jump") && rb.velocity.y > 0f);
    {
    rb.velocity = new Vector2(rb.velocity.x, rb.velocity.y * 0.5f);
    }

    Flip();
    )
    void FixedUpdate(); {
    rb.velocity = new Vector2(Horizontal * speed, rb.velocity.y);
    }

    bool IsGrounded;
    {
    return Physics2D.OverlapCircle(groundCheck.position, 0.2f, groundLayer);
    }

    void Flip(); {
    if isFacingRight && horizontal < 0f || isFacingRight && horizontal > of);}
    {
    isFacingRight - isFacing Right;
    Vector3 local scale = transform.localScale;
    localScale.x *= -1f;
    transform.localScale = localScale;
    }

    }
    }
     
  2. Stem110

    Stem110

    Joined:
    Feb 18, 2023
    Posts:
    4
    Idea's ↓
     
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,058
    Put down the actual error?
    No one knows thausands of error codes by memory
     
  4. Stem110

    Stem110

    Joined:
    Feb 18, 2023
    Posts:
    4
    Type or namespace definition, or end of life expected
     
  5. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    720
    You need to provide the entire error. It's going to give you a file name and line number (double-clicking it should open your text editor with the cursor on the offending part of the script ).
     
    DevDunk likes this.
  6. Stem110

    Stem110

    Joined:
    Feb 18, 2023
    Posts:
    4
    I am trying new code sorry for wasting time.