commandcenter
commandcenter copied to clipboard
class BWAPI::Race has no member "Protoss"
Compile time error. Only a problem with the Win32 build, but maybe that's too obvious.
BuildingManager.cpp, line 422: 'class BWAPI::Race has no member "Protoss"'
I have the same problem. I run on ubuntu18, bwapi install from github git clone.
Maybe you should change "CCRace::Protoss" to "BWAPI::Races::Protoss" in BuildManager.cpp
I also have this problem, and I foud the code of
~~if (m_bot.GetPlayerRace(Players::Self) == BWAPI::Races::Protoss)
~~
if (m_bot.GetPlayerRace(Players::Self) == CCRace::Protoss)
is push on 2018-01-16.
I don't know why an obvious error like this can exist such a long time.
I change the windows SDK from 8.1 to 10.0.17763.0, and use the "Visual Studio 2017 (v141)" tool set before build. Is this the reason?
I clone the version of 2017-12-04, it's build success and work fine.
The line of code you're referencing is not the same as what's in the repo. When did you clone it? I cannot reproduce any of these errors
The line of code you're referencing is not the same as what's in the repo. When did you clone it? I cannot reproduce any of these errors
@davechurchill oh ,sorry, I make a mistake, the original code is
if (m_bot.GetPlayerRace(Players::Self) == CCRace::Protoss)
This code cause the error. I changed the code enable to build successfully.
I will close this for now as it appears to be fixed?
I will close this for now as it appears to be fixed?
@davechurchill Sorry, maybe my English is not good, causing misunderstanding.
The original code from github:
if (m_bot.GetPlayerRace(Players::Self) == CCRace::Protoss)
cann't build success.
The code
if (m_bot.GetPlayerRace(Players::Self) == BWAPI::Races::Protoss)
can build success,but I don't think this modification is good, because it cann't support SC2.
I compile the CommandCenter project with the Win32 Platform.
What is the build error message?
What is the build error message?
The error message is:
BuildingManager.cpp, line 422: 'class BWAPI::Race has no member "Protoss"'
That is impossible though. That line is a single bracket
https://github.com/davechurchill/commandcenter/blob/master/src/BuildingManager.cpp#L422
That is impossible though. That line is a single bracket
https://github.com/davechurchill/commandcenter/blob/master/src/BuildingManager.cpp#L422
I just copy the Migdalin's message. OK, I clone the newest version of commandcenter, and the error line is 437...
I confirm that the error is still present. After changing that line of code to:
if (m_bot.GetPlayerRace(Players::Self) == BWAPI::Races::Protoss)
Then the project builds fine.
Can you submit a pull request with that fix?
On Sat., Dec. 28, 2019, 7:22 p.m. vlad-gregor, [email protected] wrote:
I confirm that the error is still present. After changing that line of code to: if (m_bot.GetPlayerRace(Players::Self) == BWAPI::Races::Protoss) Then the project builds fine.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/davechurchill/commandcenter/issues/81?email_source=notifications&email_token=AAJCJKA3CWGXPNXIY3FRW33Q27KBJA5CNFSM4GIUYAB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYTUQI#issuecomment-569457217, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJCJKAVYURFBPKTRXLE7X3Q27KBJANCNFSM4GIUYABQ .
I think I just did that. However, I have to say, that I'm not able to check, if the code compiles with "x64" build configuration, as I do not have SC2API installed. I only wanted to build CommandCenter for SC BW (which I'm not able to do anyway, as it seems, that CommandCenter is based on BWAPI v. 4.2.0 and I have the latest v. 4.4.0 which seems to be incompatible - more details here: https://github.com/davechurchill/commandcenter/issues/86 ).