View Single Post
10/15/18, 05:29 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
I just tried it myself and from what I see, the function returns a variable number of id64 values.
The missing entry for ESOUIDocumentation would probably look like this:

* GetPlacedFurnitureChildren(*id64* _furnitureId_)
** _Uses variable returns..._
** _Returns:_ *id64:nilable* _childFurnitureId_

In order to iterate over them you could use one of the following approaches:
Lua Code:
  1. function test(...)
  2.     for i = 1, select("#", ...) do
  3.         local childId = select(i, ...)
  4.         d(Id64ToString(childId))
  5.     end
  6. end
  7. test(GetPlacedFurnitureChildren(HousingEditorGetSelectedFurnitureId()))
  8.  
  9. function test2()
  10.     local childIds = {GetPlacedFurnitureChildren(HousingEditorGetSelectedFurnitureId())}
  11.     for i = 1, #childIds do
  12.         local childId = childIds[i]
  13.         d(Id64ToString(childId))
  14.     end
  15. end
  16. test2()

P.s. Moved the thread since it doesn't belong in the wishlist.
  Reply With Quote