Quantcast WoWInterface - View Single Post - C_Timer problem with weakaura trigger
View Single Post
11-21-19, 06:35 PM   #5
A Firelord
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 482
A weakaura custom trigger requires a function object to work. You're getting an error because C_Timer.After is a function call in this scenario. Wrap what you have in a function object:

Lua Code:
  1. function(event)
  2.     C_Timer.After(3, function()
  3.         if event == "BOSS_KILL" then
  4.             return true
  5.         end
  6.     end
  7. end

If you're confused, basically weakaura trigger custom code has to start with the word "function" and end with "end", no exceptions, unless you have a global function to use, then you only use the function name and nothing else.
  Reply With Quote