Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question I have a problem with my code pls help me

Discussion in 'Scripting' started by pozitiwek, Aug 12, 2023.

  1. pozitiwek

    pozitiwek

    Joined:
    Aug 12, 2023
    Posts:
    2
    Assets\Scripts\InputMeneger.cs(14,36): error CS1002: ; expected

    this is my code:

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

    public class InputMeneger : MonoBehaviour
    {
    private PlayerInput PlayerInput;
    private PlayerInput.OnFootActions onFoot;
    // Start is called before the first frame update
    void Awake()
    {
    PlayerInput = new PlayerInput();
    onFoot = PlayerInput.onFoot
    }

    // Update is called once per frame
    void Update()
    {

    }
    private void OnEnable()
    {
    onFoot.Enable();
    }
    private void OnDisable()
    {
    onFoot.Disable();
    }
    }
     
  2. Chubzdoomer

    Chubzdoomer

    Joined:
    Sep 27, 2014
    Posts:
    106
    The error points to line 14. Study that line very carefully from start to finish. ;)
     
    pozitiwek and bugfinders like this.
  3. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    738
    the error tells you at character 36 on line 14.. other than add one for you, it cant do much more than that.

    Please also next time post code in code tags so its more readable
     
    pozitiwek likes this.
  4. wideeyenow_unity

    wideeyenow_unity

    Joined:
    Oct 7, 2020
    Posts:
    728
    Yup, can easily see a
    ;
    is expected.
     
    pozitiwek likes this.
  5. pozitiwek

    pozitiwek

    Joined:
    Aug 12, 2023
    Posts:
    2
    Thanks man now I see. Im new to scripting
     
    BrandyStarbrite likes this.