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.