- Home /
Three errors that shouldn't be errors
Hello!
I reimported an asset that has scripts that I am calling from my own script. Now I have three errors that really don't look like errors.
error CS0123: A method or delegate BuyTurboManager.OnTransactionComplete(IOSStoreKitResponse)' parameters do not match delegate
System.Action(IOSStoreKitResult)' parameters
error CS0019: Operator +=' cannot be applied to operands of type
System.Action' and method group' error CS0428: Cannot convert method group
OnTransactionComplete' to non-delegate type `System.Action'. Consider using parentheses to invoke the method
For this line:
IOSInAppPurchaseManager.instance.OnTransactionComplete += OnTransactionComplete;
Answer by Dave-Carlile · Jul 05, 2015 at 07:06 PM
Look at the declaration for IOSInAppPurchaseManager.OnTransactionComplete
, then look at the OnTransactionComplete
method that's being assigned to the delegate. The parameters much match exactly. Something changed in one of them.
Weird. I can't find the OnTransactionComplete method in the IOSInAppPurchase$$anonymous$$anager. $$anonymous$$ight have found the problem, thanks!
public Action<IOSStore$$anonymous$$itResponse> OnTransactionComplete = delegate{};
There is this one.
It might be in an ancestor class or something. If you're using Visual Studio you can right click on the OnTransactionComplete and select Go To Definition.
I can do that in $$anonymous$$onoDevelop too. :) It goes to the same class I checked.
The weird thing is that nothing in the code is red like errors usually are.
Both of them do? Do it on the both the left one and the right one, show the definitions for both.