C
C#4y ago
Boop

NullReferenceException Object reference not set to an instance of an object

List<Effects> effectsList = activePlayerEffects[targetPlayer] ?? new List<Effects>();
List<Effects> effectsList = activePlayerEffects[targetPlayer] ?? new List<Effects>();
someone save me!
2 Replies
Boop
BoopOP4y ago
Dictionary<IPlayer, List<Effects>> activePlayerEffects;
Dictionary<IPlayer, List<Effects>> activePlayerEffects;
that is activePlayerEffects
333fred
333fred4y ago
You didn't initialize activePlayerEffects Ah, I see you cross-posted to #help-0. In the future, please don't cross-post

Did you find this page helpful?