codebackup / bwapi

Automatically exported from code.google.com/p/bwapi
0 stars 0 forks source link

UnitTypes incomplete data #418

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi guys,

I'm actually surprised I didn't find this issue here, I must have missed it or 
something. But still it's pretty annoying for me.

I'm developing a bot using version 3.6.1 of the API, and most of the time I use 
accessors of a UnitType, I get invalid information. Typically, 
BWAPI::UnitTypes::Resource_Mineral_Field.isResourceContainer() returns false 
for some reason. I also tried to call this method on a unit 
(unit->getType().isResourceContainer()) when the UnitType ID was 176 
(MineralField type 1), and it returned false as well.

This happens on other accessors too (I can't get any names from units, using 
unit->getType().getName()), it always returns a empty string.

This seems like a quite visible bug, and I'm pretty sure I missed something 
somewhere. I tried to checkout the API sources to build it myself, but I had 
unresolved external symbols with BWTA, with many other problems, so I gave up.

Original issue reported on code.google.com by vincent....@gmail.com on 17 Nov 2011 at 2:07

GoogleCodeExporter commented 9 years ago
Did you initialize the typesets?
Use BWAPI::BWAPI_init();

Original comment by AHeinerm on 17 Nov 2011 at 7:29

GoogleCodeExporter commented 9 years ago
No, I didn't. I knew I forgot something, I must have removed that line from the 
ExempleAIModule and forgot about it.

Thank you.

Original comment by vincent....@gmail.com on 18 Nov 2011 at 8:55

GoogleCodeExporter commented 9 years ago
Ok.

Original comment by AHeinerm on 18 Nov 2011 at 11:49