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

Functions

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

Variables

const Error Unit_Does_Not_Exist (0)
const Error Unit_Not_Visible (1)
const Error Unit_Not_Owned (2)
const Error Unit_Busy (3)
const Error Incompatible_UnitType (4)
const Error Incompatible_TechType (5)
const Error Incompatible_State (6)
const Error Already_Researched (7)
const Error Fully_Upgraded (8)
const Error Currently_Researching (9)
const Error Currently_Upgrading (10)
const Error Insufficient_Minerals (11)
const Error Insufficient_Gas (12)
const Error Insufficient_Supply (13)
const Error Insufficient_Energy (14)
const Error Insufficient_Tech (15)
const Error Insufficient_Ammo (16)
const Error Insufficient_Space (17)
const Error Invalid_Tile_Position (18)
const Error Unbuildable_Location (19)
const Error Unreachable_Location (20)
const Error Out_Of_Range (21)
const Error Unable_To_Hit (22)
const Error Access_Denied (23)
const Error File_Not_Found (24)
const Error Invalid_Parameter (25)
const Error None (26)
const Error Unknown (27)

Function Documentation

const std::set< Error > & BWAPI::Errors::allErrors ( )

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

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:


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 Typedefs Enumerations Enumerator Friends Defines