Attempts to log out and return to the character selection screen. Results vary based on current conditions:
- If the player is in combat or under other temporary restrictions (e.g. falling), fires the 
UI_ERROR_MESSAGEevent with a message indicating the player cannot log out at the moment. - If the player is not in an inn, major city, or other "rest" area (i.e. 
IsResting()returnsnil), fires thePLAYER_CAMPINGevent, causing the default UI to show a countdown, logging the player out after a period of time if not canceled. - If the player is in a "rest" area, logs out immediately.
 
See also Client control and information functions.
Signature:
Logout()