GE Lua Documentation

Press F to search!

triggerClient

Definition


-- @/lua/common/guihooks.lua:41

-- Garbage sensitive, do not change if you don't know what garbage is
local function triggerClient(targetDsmId, hookName, ...)
  local i1 = 0
  for i = 1, select('#', ...) do
    local tv = select(i, ...)
    if tv ~= nil then
      i1 = i1 + 1
      tmpTab[i1] = tv
    end
  end
  queueHookJS(hookName, i1 == 0 and '[]' or jsonEncodeWorkBuffer(tmpTab), targetDsmId)
  table.clear(tmpTab)
end

Callers