saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2 and Valve's Deadlock, written in C#.
MIT License
96 stars 8 forks source link

Unrecognised serializer field: m_firePositions #4

Closed techlover1 closed 11 months ago

techlover1 commented 11 months ago

When attempting to use the example from readme.md with a Dathost match API demo we receive the following error. The demo in question can be found here

Unhandled exception. System.NotSupportedException: Unrecognised serializer field: m_firePositions
   at DemoFile.Sdk.CInferno.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet)
   at DemoFile.Sdk.CFireCrackerBlast.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet)
   at DemoFile.Sdk.DecoderSet.<>c__DisplayClass4_0`1.<CreateDecoder>b__1(SerializableField field)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
   at DemoFile.Sdk.DecoderSet.CreateDecoder[T](SerializerKey serializerKey)
   at DemoFile.Sdk.DecoderSet.GetDecoder[T](SerializerKey serializerKey)
   at DemoFile.Sdk.DecoderSet.GetDecoder(String className)
   at DemoFile.DemoParser.OnDemoClassInfo(CDemoClassInfo msg)
   at DemoFile.DemoEvents.ReadDemoCommand(EDemoCommands msgType, ReadOnlySpan`1 buffer)
   at DemoFile.DemoParser.Start(Stream stream, CancellationToken cancellationToken)
   at Program.Main(String[] args) in D:\Users\syoung\Downloads\demoscrape3\demoscrape3\Program.cs:line 18
   at Program.<Main>(String[] args)
saul commented 11 months ago

I've just added a feature to hopefully make the library more resilient to slight changes to the network protocol (e.g. adding new fields).

The fix is available in v0.1.11 - let me know if this doesn't resolve your issue.