Hamatora Posted June 12, 2017 Posted June 12, 2017 (edited) Suppose I created a table, and inserted 8 fields into it. Now I wish to remove the 3rd field how can I? Like this: mytable = { {"1"}; {"2"}; {"3"}; {"4"}; {"5"}; {"6"}; {"7"}; {"8"}; } Edited June 12, 2017 by Hamatora
PeaceBomb99 Posted June 12, 2017 Posted June 12, 2017 https://www.tutorialspoint.com/lua/lua_tables.htm https://en.wikibooks.org/wiki/Lua_Programming/Tables http://lua-users.org/wiki/TablesTutorial http://www.troubleshooters.com/codecorn/lua/luatables.htm Literally everything explained on these websites
Scripting Moderators thisdp Posted June 12, 2017 Scripting Moderators Posted June 12, 2017 (edited) table.remove(mytable,3) Edited June 12, 2017 by thisdp
pa3ck Posted June 13, 2017 Posted June 13, 2017 (edited) You can just set the value of that index like: myTable[3][1] = 'New Value' Edited June 13, 2017 by pa3ck
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