[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tables problem
- From: Eric Tetz <erictetz@...>
- Date: Sun, 25 Jan 2004 13:46:13 -0800 (PST)
--- Mike Atamas wrote:
> I changed it and got things to work. Here is what the function
> looks like now:
A couple suggestions: make 'a' local and don't bother checking
remaining array elements after you've found the one you're
looking for:
function dep:remove( _name )
local a ---> ADDED
for i = 1, table.getn(self.deps)
do
if self.deps[i]["name"] == _name
then
a = i
break ---> ADDED
end
end
table.remove(self.deps,a)
end
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/