Channel function

From StealthBot Wiki Backup
Revision as of 08:20, 1 December 2017 by Davnit (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Channel() Script Support Class function returns the Channel object.

Development

This function was added by Eric in version 2.7.

Documentation

'// CHANNEL
'// Returns the channel object
Public Function Channel() As Object

    Set Channel = g_Channel.Clone()

End Function

Syntax

To call a subroutine of the Channel object:

Channel().DoSomething

To store a value that the Channel object can retrieve:

Variable = Channel().GetSomething

Advanced Note: When the Channel function is called, a copy of the Channel object is made so that you cannot cause the bot to send bad information to Battle.net by changing properties of the internal channel object. Normally, the convention is to get values (like Channel.Name) from the bot's channel object, not from a channel object that you stored before using Set ChannelObj = Channel(). This also guarantees that the information is more up to date.

See the Channel object article for examples and usage of the Channel object.

See also