get_ValueAsBool error when building map
Closed this issue · 5 comments
Hi, I get this error when I try to build my map:
Seems that it cannot conert the "ubdg" unit modification into a boolean.
Here is my repo if you'd like to reproduce the error on your end. Just need to run the Launcher and hit 3.
https://github.com/YakaryBovine/AzerothWarsCSharp/tree/jass-transpiled
ValueAsBool/etc doesn't actually convert the value, it only checks if the 'object Value' property is a bool. However, as you can also see from the Type property, it's actually an int. So it actually seems more like an issue with your war3map.w3u file which has saved an ubdg property as int, even though according to unitmetadata.slk this property should be a bool.
Cool, that makes sense. It wouldn't be the first time this map has had broken data. I'll just confirm before I close.
Forgot this was a thing: Drake53/War3Api#14
Should be fixed in v5.4.2: 4f6ac27
Yep, that fixed it and I can now build again. Thankyou!