TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

Functions
Packages
Function Categories

## Functions
void | activatePackage (packageName)
void | deactivatePackage (packageName)
Boolean | isPackage (packageName)

## Detailed Description

## Function Documentation

void activatePackage | ( | packageName |  | ) |

Use the activatePackage function to activate a package definition and to re-define all functions named within this package with the definitions provided in the package body. This pushes the newly activated package onto the top of the package stack.

Parameters

  packagename | The name or ID of an existing package.

Returns
  No return value.

See also
  deactivatePackage, isPackage

void deactivatePackage | ( | packageName |  | ) |

Use the deactivatePackage function to deactivate a package definition and to pop any definitions from this package off the package stack. This also causes any subsequently stacked packages to be popped. i.e. If any packages were activated after the one specified in packageName, they too will be deactivated and popped.

Parameters

  packagename | The name or ID of an existing package.

Returns
  No return value.

See also
  activatePackage, isPackage

Boolean isPackage | ( | packageName |  | ) |

Use the isPackage function to check if the name or ID specified in packageName is a valid package.

Parameters

  packagename | The name or ID of an existing package.

Returns
  Returns true if packageName is a valid package, false otherwise.

See also
  activatePackage, deactivatePackage