'LinKin Posted March 1, 2014 Posted March 1, 2014 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.
Castillo Posted March 1, 2014 Posted March 1, 2014 No, it'll be gone as far as I know. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
'LinKin Posted March 1, 2014 Author Posted March 1, 2014 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.
WhoAmI Posted March 1, 2014 Posted March 1, 2014 table.remove(table, [pos]) -- position of value in table, for example 1'st position is 1st text
Castillo Posted March 1, 2014 Posted March 1, 2014 It'll be placed last if I'm right. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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