sm.message.subscribe

Subscribes the calling script instance to receive messages for a given key. Can only be called from server!

Kind: Function

Environments: Game

Game

sm.message.subscribe( messageKey, callbackName )

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
messageKey string The message key to subscribe to.
callbackName string The name of the callback function to invoke.