VMFInstanceInserter
VMFInstanceInserter copied to clipboard
Unhandled exception for numerical entity names
Hammer will occasionally decide to notate rotation angles with e, with rotations such as "-0 1.00179e-005 0." This causes vmfii to throw an error, since it thinks this is a string and not an integer.
Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'VMFInstanceInserter.VMFNumberValue' to type 'VMFInstanceInserter.VMFStringValue'. at VMFInstanceInserter.VMFStructure..ctor(VMFStructure clone, Int32 idOffset, Int32 nodeOffset, TargetNameFixupStyle fixupStyle, String targetName, List
1 replacements, List1 matReplacements) at VMFInstanceInserter.VMFFile.ResolveInstances() at VMFInstanceInserter.Program.Main(String[] args)
Turns out I was totally wrong! I think the issue actually occurs when you name an entity inside of an instance to something that is just an integer, like "1".
Ah that would make sense, I'll try to fix this tonight. Thanks for reporting!
Just remembered about this, having a go at fixing now.