Closed GoogleCodeExporter closed 9 years ago
You are declaring a pointer to a player class, but you cannot create or use a
player class that was not directly obtained by the Game class.
You must use the following:
int minerals = Broodwar->self()->minerals();
Where Broodwar is a pointer to the Game class obtained from BWAPI, and self()
is a member that returns a pointer to a Player object that represents the
current player.
Original comment by AHeinerm
on 17 Nov 2011 at 10:26
Actually that's not entirely true.
You can declare a pointer, but you must initialize it with a BWAPI function.
BWAPI::Player *myself = Broodwar->self();
Original comment by AHeinerm
on 17 Nov 2011 at 10:28
Thanks deathkni as i am begginer in bwapi, its quite a help.
Original comment by snake__p...@hotmail.com
on 17 Nov 2011 at 10:34
Original issue reported on code.google.com by
snake__p...@hotmail.com
on 16 Nov 2011 at 10:57