Jump to content

Clear table


enzoDs

Recommended Posts

  • Scripting Moderators
13 minutes ago, enzoDs said:

i need clear table, thanks :D

Do you want clear table from memory, reset it or clear data for certain element?

Link to comment

tabla = {}
function iniciar ()
for _, object in ipairs(aclGroupListObjects(aclGetGroup( "RSPD" )) or {}) do
	nombre = object:gsub("user.","")
    table.insert( tabla, nombre..", "..getJugadorPermiso(getAccount(nombre))..", "..getJugadorPuesto(getAccount(nombre))..", "..getJugadorSueldo(getAccount(nombre)))
end
return tabla
end

I need clear the table to so that every time the function is executed, no added elements are added

 

(google translate english xd)

Link to comment
  • Scripting Moderators
1 minute ago, enzoDs said:

tabla = {}
function iniciar ()
for _, object in ipairs(aclGroupListObjects(aclGetGroup( "RSPD" )) or {}) do
	nombre = object:gsub("user.","")
    table.insert( tabla, nombre..", "..getJugadorPermiso(getAccount(nombre))..", "..getJugadorPuesto(getAccount(nombre))..", "..getJugadorSueldo(getAccount(nombre)))
end
return tabla
end

I need clear the table to so that every time the function is executed, no added elements are added

 

(google translate english xd)

Just do:

tabla = {}

Before loop.

  • Thanks 1
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...