WoW:API LoggingChat: Difference between revisions
Jump to navigation
Jump to search
(upsated to new template) |
m (Move page script moved page API LoggingChat to API LoggingChat without leaving a redirect) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> | <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> | ||
Toggles the chat logging and returns | Toggles the chat logging and returns the current state. | ||
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> | <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> | ||
Line 12: | Line 12: | ||
=== Arguments === | === Arguments === | ||
<!-- List each argument, together with its type --> | <!-- List each argument, together with its type --> | ||
:;newState : Boolean - toggles chat logging | |||
=== Returns === | === Returns === | ||
<!-- List each return value, together with its type --> | <!-- List each return value, together with its type --> | ||
:;isLogging : Boolean - current state of logging | |||
Line 24: | Line 23: | ||
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> | <!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> | ||
if (LoggingChat()) then | if (LoggingChat()) then | ||
DEFAULT_CHAT_FRAME:AddMessage(" | DEFAULT_CHAT_FRAME:AddMessage("Chat is already being logged"); | ||
else | else | ||
DEFAULT_CHAT_FRAME:AddMessage(" | DEFAULT_CHAT_FRAME:AddMessage("Chat is not being logged - starting it!"); | ||
LoggingChat(1); | LoggingChat(1); | ||
DEFAULT_CHAT_FRAME:AddMessage("Chat | DEFAULT_CHAT_FRAME:AddMessage("Chat is now being logged to Logs\\WOWChatLog.txt"); | ||
end | end |
Latest revision as of 04:46, 15 August 2023
← WoW API < LoggingChat
Toggles the chat logging and returns the current state.
isLogging = LoggingChat([newState])
Parameters[edit]
Arguments[edit]
- newState
- Boolean - toggles chat logging
Returns[edit]
- isLogging
- Boolean - current state of logging
Example[edit]
if (LoggingChat()) then DEFAULT_CHAT_FRAME:AddMessage("Chat is already being logged"); else DEFAULT_CHAT_FRAME:AddMessage("Chat is not being logged - starting it!"); LoggingChat(1); DEFAULT_CHAT_FRAME:AddMessage("Chat is now being logged to Logs\\WOWChatLog.txt"); end