|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Author |
Message |
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
local lists? *Solved
Sooooo, how do you make a list local, and then interact with it (adding, removing, recalling variables) locally?
Edit: Also, how do you get the number of items in a specified list?
Last edited by CaveCricket48 on Mon Dec 28, 2009 12:54 am, edited 1 time in total.
|
Sun Dec 27, 2009 3:19 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: local lists?
local list = {} table.insert(list,data) table.remove(list,data) list[cell] local count = #list
in order
|
Mon Dec 28, 2009 12:23 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: local lists?
I'm having some trouble recalling variables; the console says that flylistb is nil.
The list stuff I have:
local flylistb = {}; -- Creating the list flylistb.insert(flylistb,self.startingpos) -- Adding a variable (self.startingpos is a Vector) flylistb[self.linecounter] -- Recalling a variable (self.linecounter is a number value)
EDIT: Also, how do you get the list number of an item in a list?
Scratch that, fixed. Thanks Grif.
|
Mon Dec 28, 2009 12:38 am |
|
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|