FilUnderscore / ImprovedHordes

7 Days To Die Server/Client Mod - Improves existing hordes by reworking their core behaviours.
https://community.7daystodie.com/topic/26781-improved-hordes/
Other
8 stars 3 forks source link

Error entering prefab editor 2.0.0-beta.4 #20

Closed YakovAU closed 1 year ago

YakovAU commented 1 year ago

Error when entering prefab editor

0326118-278.260 ERR [MODS] Error while executing GameStartDone on mod "ImprovedHordes" 0326118-278.262 EXC Sequence contains no elements at System.Linq.Enumerable.Average[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] selector) [0x00030] in <4d1f27d5adf942acb04444fee22824ee>:0 at ImprovedHordes.POI.WorldPOIScanner.ScanZones () [0x0014f] in <80d3512d8bed4cc88056a90b32046e32>:0 at ImprovedHordes.POI.WorldPOIScanner..ctor (ImprovedHordes.Core.Abstractions.Logging.ILoggerFactory loggerFactory) [0x0003f] in <80d3512d8bed4cc88056a90b32046e32>:0 at ImprovedHordes.ImprovedHordesMod.InitializeCore (World world) [0x00039] in <80d3512d8bed4cc88056a90b32046e32>:0 at ImprovedHordes.ImprovedHordesMod.GameStartDone () [0x00010] in <80d3512d8bed4cc88056a90b32046e32>:0 at ModEvent.Invoke () [0x00011] in :0 UnityEngine.StackTraceUtility:ExtractStringFromException(Object)

FilUnderscore commented 1 year ago

Thanks for reporting this, should be a simple fix with a check to see whether you are in the Prefab Editor or in-game before initializing the mod.

FilUnderscore commented 1 year ago

An update on this issue: This has been fixed in the latest release 2.0.0-beta.5.

Changelog note:

Fixed: NullReferenceException when loading into the prefab editor.