BWAPI
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
Functions | Variables
BWAPI::Errors Namespace Reference

Functions

Error getError (std::string name)
std::set< Error > & allErrors ()
void init ()

Variables

const Error Unit_Does_Not_Exist
const Error Unit_Not_Visible
const Error Unit_Not_Owned
const Error Unit_Busy
const Error Incompatible_UnitType
const Error Incompatible_TechType
const Error Incompatible_State
const Error Already_Researched
const Error Fully_Upgraded
const Error Currently_Researching
const Error Currently_Upgrading
const Error Insufficient_Minerals
const Error Insufficient_Gas
const Error Insufficient_Supply
const Error Insufficient_Energy
const Error Insufficient_Tech
const Error Insufficient_Ammo
const Error Insufficient_Space
const Error Invalid_Tile_Position
const Error Unbuildable_Location
const Error Unreachable_Location
const Error Out_Of_Range
const Error Unable_To_Hit
const Error Access_Denied
const Error File_Not_Found
const Error Invalid_Parameter
const Error None
const Error Unknown

Function Documentation

The set of all the error codes.

Error BWAPI::Errors::getError ( std::string  name)

Given the name of an error, this function will return the error code. For example: Errors::getError("Unbuildable Location") will return Errors::Unbuildable_Location?.


Variable Documentation

Returned if you try to get information that is not allowed with the given flag settings. For example, trying to read the enemy's resource counts while the CompleteMapInformation? flag is not enabled will return this error. Similarly, trying to read the coordinates of the screen or mouse while the UserInput flag is not enabled will also return this error.

Returned if you try to research something that is already researched.

Returned if you try to research something that is already being researched.

Returned if you try to upgrade something that is already being upgraded.

Used when a file can't be found.

Returned if you try to upgrade something that is already fully upgraded.

Returned if you to do something like try to cancel an upgrade when the unit isn't upgrading.

Returned when trying to use a tech type with the wrong Unit::useTech method.

Returned if you do something weird like try to build a Pylon with an SCV, or train Vultures in a Barracks, or order a Hydralisk to lay a spider mine.

Returned if you do something like try to lay Spider Mines when your Vulture is out of Spider Mines. Same thing with Reavers and Scarabs.

Returned if you to do something like try to order a Defiler to cast a Dark Swarm without enough energy.

Returned if you try to train or build something without enough vespene gas.

Returned if you try to train or build something without enough minerals.

Returned if you try to train more Interceptors than the Carrier can hold, try to train more Scarabs than a Reaver can hold, or try to load more units into a transport than there is space.

Returned if you try to train something without enough supply.

Returned if you do something like try to train Medics when you don't have an Academy, or try to lay Spider Mines before spider mines have been researched.

Used for bad parameters, like passing NULL or an empty string.

Returned if you try to build a barracks at TilePositions::None or something similar

Used when no error has been encountered.

Returned if you order an immovable unit, like a Protoss Photon Cannon, to attack a unit that is out of range.

Returned if you do something like order a Vulture to attack a flying unit.

Returned if you try to construct a building on an unbuildable location

Returned when trying to order a unit to do something when it is performing another order or is in a state which prevents it from performing the desired order. For example, ordering a Terran Engineering Bay to upgrade something while it is already upgrading something else will return this error. Similarly, trying to train units from a factory that is lifted will return this error.

Returned if you try to order a unit or get information from a unit that no longer exists.

Returned when attempting to order a unit that BWAPI does not own (i.e. can't order enemy army to go away)

Returned if you try to retrieve information about a unit that is not currently visible or is dead.

Used when the error code is not recognized or can not be determined.

Returned if you try to construct a building where the worker cannot reach based on static map data.

 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines