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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question I cant get a varibel to Work i have this error

Discussion in 'Scripting' started by JTL12, Dec 8, 2022.

Thread Status:
Not open for further replies.
  1. JTL12

    JTL12

    Joined:
    Dec 8, 2022
    Posts:
    4
    Assets\scrips\CollisionScript.cs(9,17): error CS1061: 'PlayerController' does not contain a definition for 'Enebled' and no accessible extension method 'Enebled' accepting a first argument of type 'PlayerController' could be found (are you missing a using directive or an assembly reference?)

    My code

    }
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. public class CollisionScript : MonoBehaviour
    5. {
    6.     public PlayerController movment;
    7.  
    8.     void OnCollisionEnter (Collision collisionInfo)
    9.     {
    10.         movment.Enebled = false;
    11.     }
    12.  
    13. }
    14.  
    15.  
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,622
    Probably for the same reason your title says "varibel" (variable). It's likely "Enabled", not "Enebled". Typos.
     
    arkano22, PraetorBlue and JTL12 like this.
  3. JTL12

    JTL12

    Joined:
    Dec 8, 2022
    Posts:
    4
    i'am from sweden and i am 10
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,954
    These are not reasons to violate forum rules. Please do not make duplicate posts, especially just to fix your own typing mistakes.

    Go to a the documentation now and see how the word "enabled" is typically spelled.

    After that, go to a dictionary and see how "Game Manager" and "Movement" are spelled.

    Also, neither of the reasons you cited change this basic fact: software engineering requires 100% accuracy.

    I outlined this for you here:

    https://forum.unity.com/threads/i-have-an-error-sc0101.1373229/#post-8655552
     
  5. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,002
    Please review the rules before posting again, and you should probably go through the tutorials. Closed.
     
Thread Status:
Not open for further replies.