View Single Post
03/31/14, 08:47 PM   #5
Errc
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 30
Originally Posted by Karner View Post
GetUnitAvARank(string unitTag)
Returns: integer rank, integer subRank

What about this for example?

a,b = unpack(GetUnitAvARank("player"))?
GetUnitAvARank does not return a table, so no need to unpack it.

Can just do this.
a,b = GetUnitAvARank("player")

Or you could create a table that contains the returned values, and then unpack that. But that is wasteful.
a,b = unpack({GetUnitAvARank("player")})

{GetUnitAvARank("player")} creates a table such like { [1] = rank, [2] = subRank }
  Reply With Quote