Thread Tools Display Modes
09-15-10, 10:42 AM   #1
Whunkle
A Defias Bandit
Join Date: Sep 2010
Posts: 3
Exclamation Saving and calling character names?

What I'm looking to do is save a characters name from a who search using the variable (charname). I have EVERYTHING working, the who search, etc, but can't figure out how to STORE the /who search and call it into my script.

Basically, I want to save character names from a /who search and check to see if i've seen them before or not. Any help would be appreciated. I'm new to the forums so thanks again!
  Reply With Quote
09-15-10, 05:08 PM   #2
Zwacky
A Defias Bandit
 
Zwacky's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 2
just create once a table, either as local or as global (but then use a unique table name). register the "WHO_LIST_UPDATE" event and then compare the returned /who names with the names in your table and save all /who names into your table for the next /who command.

Code:
local myUniqueTableNames = {}

local f = CreateFrame("Frame")
f:SetScript("WHO_LIST_UPDATE", function()
    local _, n = GetNumWhoResults()
    for i = 1, n do
        -- comparing stuff (GetWhoInfo(index)) etc.
    end
end
this should suffice.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Saving and calling character names?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off