View Single Post
04/25/15, 08:11 PM   #10
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by stAjora View Post
Why do the CHAT_SYSTEM functions not work? I can get CHAT_SYSTEM:AddMessage() to work but things like CHAT_SYSTEM:Clear() and CHAT_SYSTEM:GetMaxHistoryLines() throw an error.

Also, I thought I was crazy but am I right in that there are a **** ton of functions, specifically ZO_ functions that have no documentation? I'm finding threads and a bunch of code using or referencing these functions but I have no idea how people are figuring out how to use them.
As Ayantir said those don't exist. I think what you wanted was:
Lua Code:
  1. CHAT_SYSTEM.primaryContainer.currentBuffer:Clear()
  2. CHAT_SYSTEM.primaryContainer.currentBuffer:GetMaxHistoryLines()

As for the functions, like they said we find them by reading the games lua files or using /zgoo.
This addon has a feature to search the games global table for global functions. I use it to find functions I might want to use or to just look up a function when I forget its name. As for figuring out how to use the function, once I find a function that sounds like what I want then I go to the lua files and search for it to see how they use it, what the parameters are, and what values it returns if any. Click4Info
  Reply With Quote