.: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? My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
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 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
.: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. My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
Castillo Posted March 2, 2014 Posted March 2, 2014 Ah, well, there you see how it is. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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 ] The rEvolution is coming ...
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