Jump to content

HELP how working table.move?


ilnaz

Recommended Posts

Posted (edited)

 

 

table_example = {
[1] = {'example1'},
-- How move this table.move ↑↓ ??
[2] = {'example2'},
}

 

Edited by ilnaz
  • Moderators
Posted

 

 

3 hours ago, ilnaz said:

 

 


table_example = {
[1] = {'example1'},
-- How move this table.move ↑↓ ??
[2] = {'example2'},
}

 

table_example = {
  [1] = {'example1'},
  -- How move this table.move ↑↓ ??
  [2] = {'example2'},
}


table_example[2] = table.remove(table_example, 1)

print(table_example[1][1])
print(table_example[2][1])

 

Posted

What do you mean move the tabel? As far as I can see with your arrows you're just trying to change the positions in the table between the elements 1 and 2 (you may call them subtables as they're in the same table), am I right?

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...