View unanswered posts | View active topics It is currently Fri Dec 27, 2024 9:16 am



Reply to topic  [ 3 posts ] 
 local lists? *Solved 
Author Message
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post 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
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.105s | 13 Queries | GZIP : Off ]