GetNumTrainerServices

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Info
Added in 1.0.0 / 1.13.2

Returns the number of trainer services.

numTrainerServices = GetNumTrainerServices()

Returns
numTrainerServices
number : Total number of trainer services (used like index). Note that if you are working with an invalid target (for example, a merchant) the return value will be the last valid value, rather than 0.

Example

Prints the number of trainer services to the chatwindow

ChatFrame1:AddMessage(GetNumTrainerServices());