Search Unity

Im getting error cs0115

Discussion in 'Scripting' started by Dr_D_and_D, Jun 8, 2021.

  1. Dr_D_and_D

    Dr_D_and_D

    Joined:
    May 20, 2020
    Posts:
    25
    Code (CSharp):
    1.         public override void Awake()
    2.         {
    3.             base.Awake();
    4.  
    5.             EventHandler.RegisterEvent<bool, bool>(m_GameObject, "OnAimAbilityStart", OnAimStart);
    6.             EventHandler.RegisterEvent<bool, Use>(m_GameObject, "OnUseAbilityStart", OnUseStart);
    7.         }
     
  2. Johan_Liebert123

    Johan_Liebert123

    Joined:
    Apr 15, 2021
    Posts:
    474
    I think it might be because your trying to override a method which doesn't exist, not too sure at the moment though
     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    No one has error codes memorized and errors contain more information than just the error code. Paste the whole error message.
     
    bobisgod234 likes this.
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,727
    Remember: NOBODY memorizes error codes. The error code is absolutely the least useful part of the error. It serves no purpose at all. Forget the error code. Put it out of your mind.

    The important parts of an error message are:
    - the description of the error itself (google this; you are NEVER the first one!)
    - the file it occurred in (critical!)
    - the line number and character position (the two numbers in parentheses)

    All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don't have to stop your progress and fiddle around with the forum.

    How to understand compiler and other errors and even fix them yourself:

    https://forum.unity.com/threads/ass...3-syntax-error-expected.1039702/#post-6730855