View Single Post
10-16-19, 06:10 AM   #2
Urtgard
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 25
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);
https://wow.gamepedia.com/Handling_events

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