View Single Post
12-24-09, 01:06 PM   #3
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Code:
AM_Role = UnitGroupRolesAssigned(player);

if (AM_Role == "isTank") then
	AM_Tank = true
end
should be

Code:
    AM_Tank = UnitGroupRolesAssigned("player")
(edit: var name)

As mentioned, the quotes are required; but also, your if statement will always be false and will sometimes error, because the first return value of UnitGroupRolesAssigned is a boolean that is true if the unit is the tank, not a string like "isRole" -- just remove it entirely as above and it should work.

Last edited by Akryn : 12-24-09 at 01:55 PM.
  Reply With Quote