View Single Post
04/22/15, 09:31 AM   #5
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Originally Posted by Halja View Post
Lua Code:
  1. d(unpack(GetGuildMemberInfo(1 ,1)))
That is one way to find the number of returns if you are not sure.
You have unpack backwards there.

You can turn it into an array with:
Lua Code:
  1. local memberInfo = {GetGuildMemberInfo(1 ,1)}
which can then be accessed as you were originally expecting, stAjora.

Unpack is to go the other way if you need to get from an array to list of values:
Lua Code:
  1. local args={1,1}
  2. local a,b,c,d = GetGuildMemberInfo(unpack(args))

See http://www.lua.org/pil/5.1.html for more details about multiple return values and unpack.
  Reply With Quote