View Single Post
10/31/15, 10:38 AM   #5
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
As sirinsidiator said I don't see anything that would prevent output either. Again as sirinsidiator said try using d("some message") in each function to see if they are called. My guess would be either there is a problem with your TCC.LogMsg function or TCC:Initialize() is not being called to initialize the event registers. Do you unregister those events anywhere? If so I would check that. Where are you calling TCC:Initialize() from, can we see that code?

If you still can't figure it out paste the code somewhere, like on http://pastebin.com/ and give us a link for it.

Other things:

You should make groupMetrics local:
Lua Code:
  1. local function groupMetrics()
  2. ...
  3. end


IsPlayerInGroup(string name) takes a string name as its parameter, not the word "group", unless your characters name is group
Looking at the code I think you can use any form of the characters name: rawName, unitName, displayName, but I've not used the function so I would recommend testing these to check and see which ones work properly.
Lua Code:
  1. local unitName      = GetUnitName("player")
  2. local displayName   = GetDisplayName()
  3. local rawName       = GetRawUnitName("player")
  4.  
  5.    
  6. local isUnitNameInGroup     = IsPlayerInGroup(unitName)
  7. local isDisplayNameInGroup  = IsPlayerInGroup(displayName)
  8. local isRawNameInGroup  = IsPlayerInGroup(rawName)
  9.    
  10. d("isUnitNameInGroup: "..tostring(isUnitNameInGroup))
  11. d("isDisplayNameInGroup: "..tostring(isDisplayNameInGroup))
  12. d("isRawNameInGroup: "..tostring(isRawNameInGroup))

Last edited by circonian : 10/31/15 at 10:47 AM.
  Reply With Quote