I am trying to check if i am raid leader or assistant in a raid Group. I was thinking of using GetRaidRosterInfo().
It is the rank that gives me the information i need. 2=raid leader, 1=assistant and 0=all other players
if (GetRaidRosterInfo(self,rank,_,_,_,_,_,_,_,_,_)==2 or GetRaidRosterInfo(self,rank,_,_,_,_,_,_,_,_,_)==1) then
... some code
But i cant do like this so my question is how the code will look like to get information from GetRaidRosterInfo()
You are not using the API correctly at all. The argument is raidIndex, not what you have. Please read the API documentation. In the meantime, try this.
local playerName = UnitName("playerName")
for i = 1, MAX_RAID_MEMBERS do
local name, rank = GetRaidRosterInfo(i)
if name == playerName then
Print("My rank is %d", rank)
break -- stop do loop
Does this work in random battlegrounds. What i wonder is if a random battleground is a raid Group?
found what was wrong
local playerName = UnitName("playerName") --- shall be
local playerName = UnitName("player")
tyvm for tip
Have a great new year
Yes, sorry for the typo. You are correct.