wowserhq / blizzardry

JavaScript library for mastering the wizardry that is Blizzard's game files
MIT License
54 stars 15 forks source link

Entries Undefined when reading ADT #131

Open davemaltby opened 1 year ago

davemaltby commented 1 year ago

When reading any ADT file the following error is returned:

TypeError: Cannot read properties of undefined (reading 'entries') at Object.doodadEntries (\node_modules\blizzardry\lib\adt\index.js:117:43) at Struct._parseFields (\node_modules\restructure\src\Struct.js:51:22) at Struct.decode (\node_modules\restructure\src\Struct.js:18:12) at Struct._parseFields (\node_modules\restructure\src\Struct.js:53:22) at Struct.decode (\node_modules\restructure\src\Struct.js:18:12) at ArrayT.decode (\node_modules\restructure\src\Array.js:49:30) at Struct._parseFields (\node_modules\restructure\src\Struct.js:53:22) at Struct.decode (\node_modules\restructure\src\Struct.js:18:12) at Function.ADT.decode (\node_modules\blizzardry\lib\adt\index.js:235:16) at Object.<anonymous> (\index.js:22:15)

Checking Index.js the returned count for doodads is 0 so I'm assuming either I'm trying to read the wrong file (although the one in the example in the Readme does the same) or the structures changed.

Suggestions welcome