fNbt icon indicating copy to clipboard operation
fNbt copied to clipboard

System.NullReferenceException:

Open SteliosLL opened this issue 3 years ago • 1 comments

Καταγραφή This is where i get the exception.

With most schematic files it works ok. But with some other schematic files i get this error "System.NullReferenceException"

SteliosLL avatar Jul 13 '20 09:07 SteliosLL

You are most likely getting a NullReferenceException because root.Get(...) cannot find a tag named "Blocks". When a given tag cannot be found, root.Get(...) returns null. Trying to get ByteArrayValue from that null will throw a NullReferenceException.

Could you share an example .schematic file please? It's possible that the capitalization is wrong ("blocks" or "BLOCKS" is not the same as "Blocks") or that the tag is missing.

mstefarov avatar Aug 09 '21 22:08 mstefarov