Regular API function

simGetStackTableInfo

Description Tries to retrieve information about a possible table at the top of the stack. See also the other stack functions.
C/C++
synopsis
simInt simGetStackTableInfo(simInt stackHandle,simInt infoType)
C/C++
parameters
stackHandle: a stack handle obtained with simCreateStack.
infoType: the type of information desired:
0: whether we have a table, whether the table is an array-type or map-type, and the size of the array-type table
1: whether the table contains only null values.
2: whether the table contains only number values.
3: whether the table contains only bool values.
4: whether the table contains only string values.
5: whether the table contains only table values.
C/C++
return value
-1 in case of an error, otherwise one of following:
if infoType is 0:
sim.stack_table_circular_ref (-4): the value at the top of the stack is a circular reference table (is set to an empty table)
sim.stack_table_not_table (-3): the value at the top of the stack is not a table
sim.stack_table_map (-2): the value at the top of the stack is a map-type table, containing value-key pairs, where the keys are not all numbers, not all consecutive, or not starting at 1. Use simUnfoldStackTable to read the content of the table.
sim.stack_table_empty (0): the value at the top of the stack is an empty table.
a value>0: the value at the top of the stack is an array-type table, containing value-key pairs, where all the keys are numbers, consecutive, and starting at 1. Use simUnfoldStackTable, simGetStackUInt8Table, simGetStackInt32Table, simGetStackFloatTable or simGetStackDoubleTable to read the content of the table.
if infoType is 1: 1 if the table contains only null values
if infoType is 2: 1 if the table contains only number values
if infoType is 3: 1 if the table contains only bool values
if infoType is 4: 1 if the table contains only string values
if infoType is 5: 1 if the table contains only table values
Lua
synopsis
Lua
parameters
Lua
return values
Python
synopsis