Open KrisPrs opened 2 years ago
Can't reproduce, are you sure you're getting that error when throwing the coin before the plugin does?
No, i've got this error via error handler. The only line, where this error can occur is this: https://github.com/GabiRP/CoinTweaks/blob/0c3e97392806af5f5327e9fd9e32d1b3b4cb3e64/CoinTweaks/EventHandlers.cs#L19 I have many others plugins, but it's not possible to confilct with yours (none of them uses OnFlippingCoin event)
I know that's the line, but I can't reproduce the issue
This error have happed to me 15 times, but i can't say, why is it happening. You may be sure, my players flip the coin often
It may be many reasons ev.Player.CurrentItem to be null. Couldn't you just add a nullcheck to be sure?
Alright, use this and tell me if it still happens.
Using Mega because I can't link a dll file here
Okay, ty
Well, that error no longer happends, but i got a new one:
Afaik, this error happeds, when you try to show hint to disconnected player.
Yeah, there are many possible errors, when you use multiply Timing.CallDelayed
s
i don't think it's because there are multiple CallDelayed s, as if the first executes, the second doesn't and viceversa. Anyway, I'll look into this.
I think, this error occurs, when player has flipped the coin and rapidly dropped it before the plugin does
NullReferenceException: Object reference not set to an instance of an object Exiled.API.Features.Player.DropItem (Exiled.API.Features.Items.Item item) (at <0c29492668bf43e18175c196a750b4be>:0) CoinTweaks.EventHandlers+<>c__DisplayClass2_0.<OnFlippingCoin>b__0 () (at <6ea95509d13a4628a134f6b06adec182>:0) MEC.Timing+<_DelayedCall>d__310.MoveNext () (at <58e6c1ac7a4d44a4999c56139fd40fdf>:0) MEC.Timing.Update () (at <58e6c1ac7a4d44a4999c56139fd40fdf>:0) UnityEngine.Debug:LogException(Exception) MEC.Timing:Update()