Jump to content

Table Position retrive?


Recommended Posts

Posted

hey guys, how can i retrive a value from a certain table position?

Lets say i got a 6-inserted objects table (table.insert) and i wanted to retrive the value from pos 6, How to do this?

Posted

By objects you mean actual objects created by createObject? if so, then you can do:

local object = myTable [ 6 ] 
if isElement ( object ) then 
    local x, y, z = getElementPosition ( object ) 
end 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...