commandcenter icon indicating copy to clipboard operation
commandcenter copied to clipboard

class BWAPI::Race has no member "Protoss"

Open Migdalin opened this issue 6 years ago • 14 comments

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

Migdalin avatar Dec 05 '18 21:12 Migdalin

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

bigheiniu avatar Dec 06 '18 05:12 bigheiniu

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

bigheiniu avatar Dec 12 '18 21:12 bigheiniu

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.

koalarun avatar Dec 13 '18 15:12 koalarun

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 avatar Dec 13 '18 17:12 davechurchill

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.

koalarun avatar Dec 14 '18 00:12 koalarun

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

davechurchill avatar Dec 14 '18 09:12 davechurchill

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.

koalarun avatar Dec 14 '18 09:12 koalarun

What is the build error message?

davechurchill avatar Dec 14 '18 13:12 davechurchill

What is the build error message?

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

koalarun avatar Dec 14 '18 15:12 koalarun

That is impossible though. That line is a single bracket

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

davechurchill avatar Dec 14 '18 16:12 davechurchill

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

koalarun avatar Dec 15 '18 04:12 koalarun

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.

vlad-gregor avatar Dec 28 '19 22:12 vlad-gregor

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 .

davechurchill avatar Dec 28 '19 22:12 davechurchill

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

vlad-gregor avatar Dec 28 '19 23:12 vlad-gregor