Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class BWAPI::Race has no member "Protoss" #81

Open
Migdalin opened this issue Dec 5, 2018 · 14 comments
Open

class BWAPI::Race has no member "Protoss" #81

Migdalin opened this issue Dec 5, 2018 · 14 comments

Comments

@Migdalin
Copy link

Migdalin commented Dec 5, 2018

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"'

@bigheiniu
Copy link

I have the same problem. I run on ubuntu18, bwapi install from github git clone.

@bigheiniu
Copy link

Maybe you should change "CCRace::Protoss" to "BWAPI::Races::Protoss" in BuildManager.cpp

@koalarun
Copy link

koalarun commented Dec 13, 2018

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.

@davechurchill
Copy link
Owner

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

@koalarun
Copy link

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.

@davechurchill
Copy link
Owner

I will close this for now as it appears to be fixed?

@koalarun
Copy link

koalarun commented Dec 14, 2018

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.

@davechurchill
Copy link
Owner

What is the build error message?

@davechurchill davechurchill reopened this Dec 14, 2018
@koalarun
Copy link

What is the build error message?

The error message is:
BuildingManager.cpp, line 422: 'class BWAPI::Race has no member "Protoss"'

@davechurchill
Copy link
Owner

That is impossible though. That line is a single bracket

https://github.com/davechurchill/commandcenter/blob/master/src/BuildingManager.cpp#L422

@koalarun
Copy link

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...

@vlad-gregor
Copy link

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.

@davechurchill
Copy link
Owner

davechurchill commented Dec 28, 2019 via email

@vlad-gregor
Copy link

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: #86 ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants