Jump to content

Dynamic Table


'LinKin

Recommended Posts

Posted

Hi,

I've a table like this:

myTable[1] = "1st Text"

myTable[2] = "2nd Text"

myTable[3] = "3rd Text"

myTable[4] = "4th Text"

myTable[5] = "5th Text"

Then, I add the event onClientRender to show the message that is in the first position of the table.

And after 5 seconds, I stop showing it.

But, after these 5 seconds, I also want to 'delete' the first position of the table, and move the other positions of it.

So it'd look like this:

myTable[1] = "2nd Text"

myTable[2] = "3rd Text"

myTable[3] = "4th Text"

myTable[4] = "5th Text"

So, the question is, what would happen to the 5th position of the table? Would it still occupate a memory's space?

Need a clanwar script? Click here!

Do you want some free scripts for your DD server? Visit my website.

Posted

No, it'll be gone as far as I know.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

For example,

if I do myTable[1] = nil

and then I do table.insert(myTable, "some text"), would lua automatically place this in the 1st position of the table?

Need a clanwar script? Click here!

Do you want some free scripts for your DD server? Visit my website.

Posted

It'll be placed last if I'm right.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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