Need help deciphering CS0121: The call is ambiguous between the following methods or properties

I’m using the standard method to override a function in one of my scripts. This error has never popped up for me before, and I’m not sure how to tackle it. It’s only happening with one of my scripts, and I override quite often in my other scripts.

I’ve looked on several forums for a solution but can’t quite grasp what’s going on here. I’ve read that assembly references is creating duplicates of the output which causes confusion with the compiler. The other forums have had the solution, but not detailed enough for me to follow or understand. Any type of step by step guidance is much appreciated.

Let me know if you need more information. Cheers

    internal protected override void Activate(SurgePreset surgePreset)
    {
        base.Activate();
        StartCoroutine(SurgeUpdate(surgePreset));
        player.SetInvulnerability(surgePreset.duration + surgePreset.extraInvulnerabilityDuration);
        currentSurgePreSet = surgePreset;
    }

Paste the rest of the error message, at least. You cut it off immediately before the most important information the error message contains.

You should show the method signatures of the two methods the compiler things the call is ambiguous between.

Generally this means the argument you are using isn’t an exact match for either method, but could be implicitly converted to two different types that would match two different methods. Something like you defined both MyFunc(float) and MyFunc(double) and then tried to call MyFunc(1), so you are using an integer argument, which could be implicitly promoted to either a float or a double, and the compiler can’t tell which one you meant.

After sifting through my code, the underlying problem was a duplicate global namespace problem (Unity wasn’t kicking back a duplicate namespace error). Somewhere along the way I changed one of my interface class names to the same name as one of my other classes. All is good! Thank you both for the helping hand