I got this error and I can’t see what’s wrong with it… I have abunch of other delegates which works just fine
“TillHead.cs(22,33): error CS0019: Operator +=' cannot be applied to operands of type
EventHandler.EO_SmallImpact’ and `void’”
EventHandler.cs:
public delegate void EO_SmallImpact();
public static EO_SmallImpact EO_OnSmallImpact;
public static void EO_OnSmallImpactEvent()
{
if (EO_OnSmallImpact != null)
EO_OnSmallImpact();
}
Tillhead.cs:
void OnEnable()
{
EventHandler.EO_OnSmallImpact += this.OnSmallImpact ();
}
void OnDisable()
{
EventHandler.EO_OnSmallImpact -= this.OnSmallImpact ();
}
Am I blind?