Quantcast WoWInterface - View Single Post - [Classic]LF help with LUA
View Single Post
10-16-19, 06:10 AM   #2
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 20
You need an event handler and you must tell the frame to use this handler.

Lua Code:
  1. local frame = CreateFrame("FRAME", "FooAddonFrame");
  2. frame:RegisterEvent("PLAYER_ENTERING_WORLD");
  3. local function eventHandler(self, event, ...)
  4.  print("Hello World! Hello " .. event);
  5. end
  6. frame:SetScript("OnEvent", eventHandler);

To update the latency you maybe need an OnUpdate script.
  Reply With Quote