Using the variable tags to get the target's race or class wasn't working, as getUnitCurrentProfile is not a real function. Fixed it by getting the unitID from "target" (naming is wonky), then calling getUnitIDCurrentProfile on it.
As a bonus, as was pointed out to me on Discord, there weren't tags to get first or last name of your target, so I added that as well. It will return UnitName result as a default in case no profile could be found.
Using the variable tags to get the target's race or class wasn't working, as getUnitCurrentProfile is not a real function. Fixed it by getting the unitID from "target" (naming is wonky), then calling getUnitIDCurrentProfile on it.
As a bonus, as was pointed out to me on Discord, there weren't tags to get first or last name of your target, so I added that as well. It will return UnitName result as a default in case no profile could be found.