View Single Post
04/22/15, 09:07 AM   #3
Halja
 
Halja's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 111
Welcome to lua. Ayantir showed how to catch them. Note the local is important to avoid Global leaking. Say you don't care about the fourth return. Then this can be done.
Lua Code:
  1. local value1, value2, value3 = FunctionWichReturnMultipleThings()
The value four is just disgraded. Sometimes you will see people ignoring with the underscore.
Lua Code:
  1. local value1, _, value3, _, value4 = FunctionWichReturnMultipleThings()

You could try 'unpack' the returns just to the debug message. It should be work since it is string and integers.
Lua Code:
  1. d(unpack(GetGuildMemberInfo(1 ,1)))
That is one way to find the number of returns if you are not sure.
  Reply With Quote