• Visit Rebornbuddy
  • error CS0115: no suitable method found to override

    Discussion in 'Honorbuddy Support' started by Proto, Oct 23, 2014.

    1. Proto

      Proto New Member

      Joined:
      Jan 8, 2012
      Messages:
      219
      Likes Received:
      6
      Trophy Points:
      0
      I've found that plugins that call for public override with either "Initialize()" or "Dispose()" are not currently working in the latest HB patch. Both get error CS0115: no suitable method found to override.

      My own plugins worked when I removed these, but other more complex plugins will require bit more tweaking unless you can figure out why this is not working at the moment.

      For reference, see highvoltz current version of Radar. 1.7 is not currently working because of this.

      Further example, in my own plugins I removed the following lines of code to get them up and running again.
      Code:
              public override void Initialize()
              {
                  Logging.Write(Colors.Orange, "NoCombat Looter - Enabled v" + Version);
                  base.Initialize();
              }
      
              public override void Dispose() 
              {
                  Logging.Write(Colors.OrangeRed, "NoCombat Looter - Disabled");
                  base.Dispose();
              }
      Any advise would be greatly appreciated. Thank you.
       
    2. Proto

      Proto New Member

      Joined:
      Jan 8, 2012
      Messages:
      219
      Likes Received:
      6
      Trophy Points:
      0
      I found the answer on another thread...

      Seems "Initialize" has been replaced by "OnEnable" & "Dispose" is replaced by "OnDisable"

      Now I can update my plugins accordingly.

      Example:
      Code:
              public override void OnEnable()
              {
                  Logging.Write(Colors.Orange, "NoCombat Looter - Enabled v" + Version);
                  base.OnEnable();
              }
      
              public override void OnDisable() 
              {
                  Logging.Write(Colors.OrangeRed, "NoCombat Looter - Disabled");
                  base.OnDisable();
              }
       
    3. Tony

      Tony "The Bee" Staff Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      128,834
      Likes Received:
      571
      Trophy Points:
      113
    4. Proto

      Proto New Member

      Joined:
      Jan 8, 2012
      Messages:
      219
      Likes Received:
      6
      Trophy Points:
      0
      Sorry about that Tony.. although the change to OnEnable & OnDisable has resolved this issue for me, I'll attempt to replicate the original error and get you that log in the proper thread.
       
    5. Tony

      Tony "The Bee" Staff Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      128,834
      Likes Received:
      571
      Trophy Points:
      113
      thank you :)
       

    Share This Page