GetPlacedFurnitureChildren return type
Hi and sorry to bother you guys, but [and please tell me if I am crazy] the return type for the function...
GetPlacedFurnitureChildren( id ) ...may be a data type that isn't native to LUA (perhaps a C array that isn't cast for LUA? I am not sure how the game's host C++ executable passes data to/from the LUA interpreter) The steps to reproduce this issue are: 1. Link multiple children to a parent item. 2. Use a statement similar to the following: /script d( type( GetPlacedFurnitureChildren( parentItemId ) ) ) What I am seeing is "number", even though a statement such as... /script d( GetPlacedFurnitureChildren( parentItemId ) ) ...will output a 'list' of furniture Ids (the children). Interacting with this return value as if it were a table produces the standard "Operator # (or whatever) is not support for # number" error. The strange part - and the reason why I think the return value may be cast incorrectly for LUA - is that the output is clearly a table, or at least an array-like structure. The end result though is that I cannot index any id in the list beyond the first one as LUA refuses to allow it to be referenced as a table. I hope this information helps! Thank you so much! @Cardinal05 |
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:
P.s. Moved the thread since it doesn't belong in the wishlist. |
All times are GMT -6. The time now is 09:38 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI