.:HyPeX:. Posted March 1, 2014 Posted March 1, 2014 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?
Castillo Posted March 1, 2014 Posted March 1, 2014 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
.:HyPeX:. Posted March 2, 2014 Author Posted March 2, 2014 What i actually wanted was the myTable [ 6 ] thingy, all i wanted is how to retirve °6 value.
Moderators Citizen Posted March 2, 2014 Moderators Posted March 2, 2014 And if you mean't the last value in a table: local value = myTable[ #myTable ]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now