Hi!
I'm experiencing an issue while coding my LootCouncil-addon.
The basic situation is: There is a number of members of the loot council (maybe 3 or 4 in the case of my guild) and there is a number of "normal" raid users. Everytime LOOT_OPENED fires, the loot council members get a screen with the available loot and provide the loot to the normal users that therefore vote their "need", "second specc", "transmog", etc.
Technically I've decided to handle this with a three dimensional hash table. Every user creates it's own entry in the hash table like this:
Code:
ORC_Voting[ORC_lootLinks[i]][1][UnitName("player")] = string.join("*", link, ilvl);
While ORC_Voting obviously is the table-name, the first index is the LootLink of the given item, the second index gives concrete information about the voted level (in this case [1] means "pass") and the third index is the user name. After voting the members of the loot council get the command to reload the screen (if the opened tab is the one that shows the item in charge), via
SendAddonMessage.
Code:
SendAddonMessage("ORC_USER", "Refresh", "RAID");
This works just fine, I think. The problem is the routine to show the votings to the loot council:
Code:
local function LoadScreen(buttonNumber)
for n = 1, #ORCA_lootLinks do
for i = 1, 5 do
for m = 1, GetNumGroupMembers() do
local name, _, _, _, _, _, _, _, _, _, _ = GetRaidRosterInfo(m);
print("Loot Nr. " .. n .. ", Voting Nr. " .. i .. ", Spieler: " .. name .. ": " .. ORC_Voting[ORCA_lootLinks[n]][i][name]);
end
end
end
end
After testing this I got
this error. Obviously something is out of index, but I can't find the problem. Can anyone of you?
Or does anyone has any idea for a more simple solution rather than the three-dimensional hash table-thign?
Greetings,
Odjur