Jump to content

Format/delete a table..


Feche1320

Recommended Posts

For example, I have this:

  
local table = { value1 = {}, value2 = {}, value3 = {} } 
  
for i = 1, math.random(9999, 99999) do 
    table.insert(table, { value1 = math.random(1, 10), value2 = math.random(500, 1000), value3 = "wawawa" ..i }) 
end 

Now, how could I clear the table, leaving it empty again?

Thanks!

PD: That is an example.

Link to comment
local table = { value1 = {}, value2 = {}, value3 = {} } 
  
for i = 1, math.random(9999, 99999) do 
    table.insert(table, { value1 = math.random(1, 10), value2 = math.random(500, 1000), value3 = "wawawa" ..i }) 
end 
  
-- makes the table to an empty table 
table = {} 

Link to comment

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