WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Extracting Zone from GetRaidRosterInfo (https://www.wowinterface.com/forums/showthread.php?t=1640)

Azile 09-12-05 03:59 PM

Extracting Zone from GetRaidRosterInfo
 
Hi I am trying to write a ui plugin that will allow me to dump a list of players who are in the same zone as me and in my raid as me. I cannot seem to get the zone info to jive though. Here is the basic portion of what I am doing:

function ZonedTrack()
local name, rank, subgroup, level, class, fileName, zone, online, isDead
local x,y;
local Text;
local tab = " ";
local Position="";

local numRaidMembers = GetNumRaidMembers();
if numRaidMembers ~= 0 then
local currentZoneName = GetZoneText();
x, y = GetPlayerMapPosition("player");
Text = "";
--Text = Text .. "Zone Name: " .. currentZoneName.."\n"
for i=1, numRaidMembers do
local name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(i);
if RaidPosition == 2 then
Position = "Raid Leader";
elseif RaidPosition == 1 then
Position = "Officer";
else
Position = "";
end
if i ~= 1 then
Text = Text .. "\n";
end
if currentZoneName == zone then
Text = Text ..name ..zone;
else

end
end
-- Unknown (2) - Raid Leader, (1) = Officer, (0) - Player
RAID_INFO_TEXT = RAID_INFO_TEXT.."\n"..Text;
RIScrollEditBox:SetText(RAID_INFO_TEXT);
RegisterForSave("RAID_INFO_TEXT");
else
DEFAULT_CHAT_FRAME:AddMessage("You are not in a raid, no raid information can be gathered",1,1,1);
end
end

farang 09-13-05 04:38 AM

as a general hint:
use DEFAULT_CHAT_FRAME:AddMessage("...") to debug your code.

as far as i can see ,you should get the zone info.


All times are GMT -6. The time now is 03:37 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI